|
Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com |
RE: odbc cursor
From: Koetter, Thomas Theodor (thomas.theodor.koetter
sap.com)
Date: Wed Jul 02 2003 - 07:58:25 CDT
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hi Jean-Michel
> -----Original Message-----
> From: jean-michel OLTRA [mailto:jm.oltra
espinasse.net]
> Sent: Mittwoch, 2. Juli 2003 11:36
> To: Sapdb General
> Subject: odbc cursor
>
>
>
> 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"
Please look at the ODBC reference, chapter 12. If you think, your program
is correct, but the ODBC driver does not work properly, please send me
a small example producing the problem. Furthermore, please tell me the
version of the driver and the SQL-mode, you use.
Regards Thomas
----------------------------------------------
Dr. Thomas Kötter
SAP DB, SAP Labs Berlin
Hurry up, SAP DB is open source www.sapdb.org
_______________________________________________
sapdb.general mailing list
sapdb.general
listserv.sap.com
http://listserv.sap.com/mailman/listinfo/sapdb.general
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]