Re: ESQL C problem with sqlerrd[2]
Posted in 1992
Kristen Altman writes: >In my application, I am using ESQL C 4.1 and formatting >dynamic SQL statements. > >I have found the following problem/possible bug: > >After the first fetch the number of rows returned in sqlerrd[2] >is 0, but the sqlca.sqlcode = 0 also. If I understand this correctly, >the sqlerrd[2] says there are no rows, but the sqlcode says there are rows. When fetching data with a cursor, sqlerrd[2] will not be set until the last bufferfull of rows are selected into by the server (primarily because you can't know how many rows there will be until that point). To put it more simply, on selects with cursors, do not expect sqlerrd[2] to be filled in until the last row has been fetched (there are ways around this, such as using a scroll cursor and fetching last). Dave -- Disclaimer: These opinions are not those of Informix Software, Inc. ************************************************************************** "I look back with some satisfaction on what an idiot I was when I was 25, but when I do that, I'm assuming I'm no longer an idiot." - Andy Rooney