home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / database / informix / 2790 < prev    next >
Encoding:
Internet Message Format  |  1992-12-23  |  1.5 KB

  1. Path: sparky!uunet!olivea!gossip.pyramid.com!pyramid!infmx!davek
  2. From: davek@informix.com (David Kosenko)
  3. Newsgroups: comp.databases.informix
  4. Subject: Re: ESQL C problem with sqlerrd[2]
  5. Message-ID: <1992Dec17.172150.328@informix.com>
  6. Date: 17 Dec 92 17:21:50 GMT
  7. References: <1giuitINNcgq@emory.mathcs.emory.edu>
  8. Sender: news@informix.com (Usenet News)
  9. Organization: Informix Software, Inc.
  10. Lines: 24
  11.  
  12. Kristen Altman writes:
  13. >In my application, I am using ESQL C 4.1 and formatting 
  14. >dynamic SQL statements.
  15. >
  16. >I have found the following problem/possible bug:
  17. >
  18. >After the first fetch the number of rows returned in sqlerrd[2]
  19. >is 0, but the sqlca.sqlcode = 0 also.  If I understand this correctly,
  20. >the sqlerrd[2] says there are no rows, but the sqlcode says there are rows.  
  21.  
  22.  
  23. When fetching data with a cursor, sqlerrd[2] will not be set until the
  24. last bufferfull of rows are selected into by the server (primarily because
  25. you can't know how many rows there will be until that point).  To put
  26. it more simply, on selects with cursors, do not expect sqlerrd[2] to be
  27. filled in until the last row has been fetched (there are ways around
  28. this, such as using a scroll cursor and fetching last).
  29.  
  30. Dave
  31. -- 
  32. Disclaimer: These opinions are not those of Informix Software, Inc.
  33. **************************************************************************
  34. "I look back with some satisfaction on what an idiot I was when I was 25,
  35.  but when I do that, I'm assuming I'm no longer an idiot." - Andy Rooney
  36.