RESEND: Select on empty table return status
Posted in 2000
Topics: Stored Procedures & SPL, Connectivity: ESQL/C, 4GL & Embedded SQL, Platform-Specific Issues
Sorry about any duplication. I am having trouble with my web based email service and am not confident this message went out, or that I will be able to retrieve any answers in a timely manner. ------- Original (not in the sense of creative....) message ---------- 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
Can you post the code? Are you sure the you are testing the result code from your select correctly? Sorry about the eggs ;o) -- --------------------------------------- Tony Flaherty aef@mfs.misys.co.uk Analyst Programmer Misys Financial Systems All statements and opinions are my own, Misys don't pay me enough to have opinions on their behalf . Info Temp wrote in message <8dfkem$5mr$1@news.xmission.com>... > >Sorry about any duplication. I am having trouble with my web based email >service and am not confident this message went out, or that I will be >able to retrieve any answers in a timely manner. > >------- Original (not in the sense of creative....) message ---------- >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 > > >