[Tutor] pysqlite and sqlite_last_insert_rowid()

Alan Trautman ATrautman@perryjudds.com
Fri Aug 1 14:03:01 2003


I cannot confirm this with the two databases you mention but the normal way
with SQL/Oracle is to complete the add with an update if needed and than
move last. If many users are the system move last and find the last item
added by that user.

Some systems allow update and will keep you on that current record. After
the update you should be able to see/read the id field in the current
recordset. If you use INSERT you will have to use the first method.

HTH,

Alan

-----Original Message-----
From: Rick Pasotto [mailto:rick@niof.net]
Sent: Friday, August 01, 2003 12:26 PM
To: tutor@python.org
Subject: [Tutor] pysqlite and sqlite_last_insert_rowid()


How do I get the last_insert_id using pysqlite? The table is defined
with an 'id integer primary key'.

-- 
"By definition, a government has no conscience.  Sometimes it has
 a policy, but nothing more." -- Albert Camus
    Rick Pasotto    rick@niof.net    http://www.niof.net

_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor