Select on empty table return status
Posted in 2000
Topics: Stored Procedures & SPL, Connectivity: ESQL/C, 4GL & Embedded SQL, Platform-Specific Issues
I have an empty table created to hold open and closure dates for projects. I'm adding the 4gl code to populate this table and am running across a strange problem. Since none of the existing projects have dates associated with them any closure will not find a date record to update, so I decided to use a select to determine if a record exists and give the operator the opportunity to input an open date based on their knowledge of the project and then do an insert instead of an update. Here's the problem. The select on the empty table return status indicates a row was found. I put in a display to find the open date (the column I am selecting) and I get the following garbage on the first attempt: Open date is :04/1ޭ''ޭ: Subsequent attempts display a date of 12/31/1899 until I exit the program and reenter, at which time it reverts back to garbage. Neither of these results are valid or useful, as you can imagine, since the program goes on to try to update a row that does not exist rather than create one. I have run update statistics to no avail. Platform is RS6000 running AIX 4.3.2 Informix 7.31.UC2X3 I would appreciate the benefit of your accumulated wisdom. Cash contributions would also be nice as an early retirement would also relieve me from this problem. Thanks, carlos Currently on hiatus from unemployment. ---------------------- Do you do Linux? :) Get your FREE @linuxstart.com email address at: http://www.linuxstart.com
Carlos Benjamin wrote: > > Here's the problem. The select on the empty table return status indicates a row was found. Are you kidding? Post the code and maybe someone will be able to point a finger at what's going wrong. Rudy