Hi Jean-Michel > -----Original Message----- > From: jean-michel OLTRA [mailto:[EMAIL PROTECTED] > 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 [EMAIL PROTECTED] http://listserv.sap.com/mailman/listinfo/sapdb.general
