This is a discussion on Number of rows processed on unload within the Informix forums, part of the Database Server Software category; --> Hi: In 4gl when i make an UNLOAD does sqlca.sqlerrd[3] gets assigned with the number of rows processed ? ...
| |||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| Hi: In 4gl when i make an UNLOAD does sqlca.sqlerrd[3] gets assigned with the number of rows processed ? My doubt is because SELECT(s) assign sqlca.sqlerrd[3] with estimated number of rows processed, but since UNLOAD is runned on the 4gl process (and not in engine), 4gl could easily know how rows was unloaded. TIA Sérgio sending to informix-list |
| ||||
| sergio@moredata.pt wrote: > In 4gl when i make an UNLOAD does sqlca.sqlerrd[3] gets assigned with the > number of rows processed? > > My doubt is because SELECT(s) assign sqlca.sqlerrd[3] with estimated > number of rows processed, but since UNLOAD is runned on the 4gl process > (and not in engine), 4gl could easily know how rows was unloaded. The mere fact that you are asking strongly suggests that it does not. The likely source of trouble is that the UNLOAD statement also closes and frees the cursor, and releases the prepared statement, and otherwise does SQL operations after the final FETCH, so the SQLCA gets clobbered. You have to be rather careful to preserve the correct SQLCA value, allowing errors in the cleanup to show, but preserving the SQLCA with the final row count if everything is OK. You're right; it is not particularly hard to code it so I4GL sets the count correctly. However, if you are asking, then either you haven't tried it (please go and do so before asking next time) or it doesn't work. -- Jonathan Leffler #include <disclaimer.h> Email: jleffler@earthlink.net, jleffler@us.ibm.com Guardian of DBD::Informix v2003.04 -- http://dbi.perl.org/ |