|
Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com |
odbc cursor
From: jean-michel OLTRA (jm.oltra
espinasse.net)
Date: Wed Jul 02 2003 - 04:35:39 CDT
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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
sapdb.general
listserv.sap.com
http://listserv.sap.com/mailman/listinfo/sapdb.general
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]