--On 9. März 2007 15:30:23 +0100 Jary Busato <[EMAIL PROTECTED]> wrote:

Yes, I must do it when I need to know an autonumber PK after an insert.
when DB support transaction i write:

begin transaction

insert foo into bar
<dtml-var sql_delimiter>
SELECT LAST_INSERT_ID() as lastid
commit

Sorry, but you must be crazy to perform you own transaction handling within Zope. Dealing with transactions is the task of Zope and your database but it is *not recommended* to perform your own transaction hand here...at least not in this way. If you want o integration a third-party system the transaction handling of Zope: look at the DataManager API of Zope's
transaction module.

-aj

Attachment: pgpCOvEGVPQep.pgp
Description: PGP signature

_______________________________________________
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )

Reply via email to