> Is there a way to specify "WHERE CURRENT OF" for an update statement,
> using sapdb.dbapi module
>
> cursor.execute ("SELECT ... FROM TABLENAME WHERE ... FOR UPDATE OF
> COLUMNNAME")
> and then ?
> cursor.execute ("UPDATE TABLENAME WHERE CURRENT OF ?
>
> I did not see any kind of getCursorName() method.
You have to access the 'inner' cursor object:
cursor = session.cursor ()
cursor.execute ('select * from messages')
innerCursor = cursor._Cursor__cursor
# important: read only single rows from the server
# otherwise, the CURRENT OF position will be wrong
innerCursor.setFetchSize (1)
cursorName = innerCursor.cursorName ()
Use a second cursor object for the UPDATE commands or the 'inner' cursor object will
be overwritten.
Daniel Dittmar
--
Daniel Dittmar
SAP Labs Berlin
[EMAIL PROTECTED]
> -----Original Message-----
> From: Jean-Michel OLTRA [mailto:[EMAIL PROTECTED]
> Sent: Thursday, April 29, 2004 9:25 AM
> To: MaxDb
> Subject: update...where current of with Python
>
>
>
>
> bonjour,
>
> Is there a way to specify "WHERE CURRENT OF" for an update statement,
> using sapdb.dbapi module
>
> cursor.execute ("SELECT ... FROM TABLENAME WHERE ... FOR UPDATE OF
> COLUMNNAME")
> and then ?
> cursor.execute ("UPDATE TABLENAME WHERE CURRENT OF ?
>
> I did not see any kind of getCursorName() method.
>
> thanks,
>
> --
> jm
>
>
> --
> MaxDB Discussion Mailing List
> For list archives: http://lists.mysql.com/maxdb
> To unsubscribe:
http://lists.mysql.com/[EMAIL PROTECTED]
--
MaxDB Discussion Mailing List
For list archives: http://lists.mysql.com/maxdb
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]