bonjour,

I'm trying to use "WHERE CURRENT OF" syntax to update some rows using
odbc.
But I get "Invalid cursor state" error when I do the following:

SQLExecDirect (stmt, "DECLARE MYCURS CURSOR FOR <select stmt> FOR UPDATE
OF columnname", SQL_NTS);
then I begin to loop over resultset with:
SQLFetchScroll (stmt, SQL_FETCH_NEXT, 0);
and then send a new value with SQLExecDirect () within the loop:
UPDATE table SET columnname = 'new value' WHERE CURRENT OF MYCURS
But looping break immediately on first row with "Invalid cursor state"

I retrieve correct values with SQLFetchScroll ()
MYCURS can be retrieved with SQLGetCursorName ()

Can I use "WHERE CURRENT OF" for updating with ODBC ? Is that correct
behavior with ODBC ?

-- 
jean-michel
_______________________________________________
sapdb.general mailing list
[EMAIL PROTECTED]
http://listserv.sap.com/mailman/listinfo/sapdb.general

Reply via email to