[DB-SIG] Positioned Update/Delete
Dr. Dieter Maurer
Thu, 23 Apr 1998 15:47:50 +0200
Thank you for your reply.
> On Thu, 23 Apr 1998, Dr. Dieter Maurer wrote:
> > How should positioned update/delete be best used with the DB-API:
<----- snip ---->
> 4a. cursor.execute("update TABLE set CURRENT = ?", (current,))
> Assuming you are using an SQL-89 or so database; the API doesn't really
> specify the query language syntax.
WHERE CURRENT OF cursor
Thus, I could formulate my question better in this way:
"How should the cursor (which is a Python object) best be transported
into the SQL world."
I see two interpretations for your suggestion:
1. you suggest not to specify it at all (and "current" (in your suggestion)
means the new value). But this might conflict with a searched
update where the "where" clause has been omitted.
2. "current" (in your suggestion) means in fact "cursor" which
should be transfered via dynamic parameter into the SQL world.
I can imagine, that this is a good solution.
Thank you again.