I got sqlstate=ix000
Posted in 1999
Topics: Error Codes & Troubleshooting, Connectivity: ESQL/C, 4GL & Embedded SQL, Platform-Specific Issues
I got my esql/c code from the supplied demos with Client sdk 2.30uc11
for Linux.
SE7.24uc5 for linux kernel 2.0.34 runs on Linux-Mandrake 6.0.
Following is the related code to declare and open a cursor:
EXEC SQL connect to 'uxsystem';
printf("Enter username: ");
scanf ("%s", wanted_user);
EXEC SQL declare user cursor for
select * from users where username = :wanted_user;EXEC SQL open user;
EXEC SQL fetch user into :user_rec[row_count];
.......followed by printing of the user_rec components.
The compilation is fine. When I run, nothing come out. Then I printed to
see that
sqlcode=-400 and sqlstate=ix000. Looking up the meaning of the code,
sqlstate=ix000 is an informix reserved error code. No clue.
The same source code compiled and run on hpux 11.0, SE 7.23 with csdk
2.30 and
esqlc 9.21, with no problem.
Please help.
Jun
Running finderr -400 returns:
-400 Fetch attempted on an unopened cursor
This FETCH statement names a cursor that has never been opened or has
been closed. Review the program logic....
You get the idea.
You too can run finderr.
Art S. Kagel
Humphrey Zhang wrote:
>
> I got my esql/c code from the supplied demos with Client sdk 2.30uc11
> for Linux.
> SE7.24uc5 for linux kernel 2.0.34 runs on Linux-Mandrake 6.0.
>
> Following is the related code to declare and open a cursor:
>
> EXEC SQL connect to 'uxsystem';
> printf("Enter username: ");
> scanf ("%s", wanted_user);
> EXEC SQL declare user cursor for
> select * from users where username = :wanted_user;> EXEC SQL open user;
> EXEC SQL fetch user into :user_rec[row_count];
> .......followed by printing of the user_rec components.
>
> The compilation is fine. When I run, nothing come out. Then I printed to
> see that
> sqlcode=-400 and sqlstate=ix000. Looking up the meaning of the code,
> sqlstate=ix000 is an informix reserved error code. No clue.
>
> The same source code compiled and run on hpux 11.0, SE 7.23 with csdk
> 2.30 and
> esqlc 9.21, with no problem.
>
> Please help.
>
> Jun