Translating with DrWatson… this can take a few seconds the first time.
This is a genuine, complex translation. DrWatson protects commands, error codes, and log output while naturally translating the surrounding text. It’s translated once and saved.
I need some help here.
I'm using esqlc and cursors in a program that should update a field from a
table, but I get this error message: SQLSTATE code 24000: INVALID CURSOR
STATE.
And this is what I do:
EXEC SQL declare micursor cursor for
select login into :login
from otp_users
where id_mode ="N"
for update of login;
I open the cursor and then there's a loop with this (among other things):
EXEC SQL fetch micursor into :login;
EXEC SQL update otp_users set login= :login
where current of micursor;
Besides, if the cursor is declared with the "for update" statement I get
nothing when I print out the content of the login variable.
What am I doing wrong?
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum
We use strictly necessary cookies to make this site work. With your
consent we’d also use optional cookies for analytics and marketing. You can accept all,
reject all, or choose. Read our Cookie Policy.