General discussion

Locked

Cursor and Fetch Problem of INFORMIX?

By wang_bo/gx/ccb ·
I use INFORMIX DYNAMIC SERVER 9.21UC5 on AIX4.3.3 with ML08, in one program, I do this:

...
$ delcare c_cur cursor for select * from s_table;
$ open c_cur;
$ fetch c_cur;
while sqlca.sqlcode==0
{
do something;
$ fetch c_cur;}
put it simple, I have omitted the error dection syntax. the problem is:
ON theory, It let me fetch every record of table s_table, but occasionally It does not : some rows are not fetched or one row is fetched more than one time , can this be possible?

This conversation is currently closed to new comments.

1 total post (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

Cursor and Fetch Problem of INFORMIX?

by dbeggs In reply to Cursor and Fetch Problem ...

This will not answer your question, but give you a place to start.

1) When you run your script is the table/record locked? Does your script read records only or does it try to update records as well?

2) Write another script that reads and updates a record in the table that you are accessing.

3) Run the new script and keep the record open.

4) Run your script and see if the record that is opened by the new script is skipped.

If you still cannot find the problem try adding an "order by" clause to your "select" statement.

Back to Web Development Forum
1 total post (Page 1 of 1)  

Related Discussions

Related Forums