Re: [Zope] How can run multiple query in an Z sql method

2007-03-09 Thread Maciej Wisniowski
>> If I understood you're telling me that begin and commit statements are >> "redundant". > > No in this case they would be an error. > >> Sometimes conflicts are not correctly managed by ZTM (no rollbacks in db) > > Examples? Which bug reports? Stored procedures implementation in DCOracle2 (ori

Re: [Zope] How can run multiple query in an Z sql method

2007-03-09 Thread Marco Bizzarri
On 3/9/07, Jary Busato <[EMAIL PROTECTED]> wrote: Marco Bizzarri ha scritto: > On 3/9/07, Jary Busato <[EMAIL PROTECTED]> wrote: >> If I understood you're telling me that begin and commit statements are >> "redundant". > > Yes, exactly: they are issued by Zope at the boundaries of a transaction.

Re: [Zope] How can run multiple query in an Z sql method

2007-03-09 Thread Marco Bizzarri
On 3/9/07, Jary Busato <[EMAIL PROTECTED]> wrote: If I understood you're telling me that begin and commit statements are "redundant". Yes, exactly: they are issued by Zope at the boundaries of a transaction. Sometimes conflicts are not correctly managed by ZTM (no rollbacks in db) Are you u

Re: [Zope] How can run multiple query in an Z sql method

2007-03-09 Thread Andreas Jung
--On 9. März 2007 16:45:56 +0100 Jary Busato <[EMAIL PROTECTED]> wrote: My only need is to be sure to keep the right id; I did'nt use this method for other operations. You sayd that it's not recommended but I don't understand why in this simple context. Simple or complex context..that does

Re: [Zope] How can run multiple query in an Z sql method

2007-03-09 Thread Tino Wildenhain
Jary Busato schrieb: If I understood you're telling me that begin and commit statements are "redundant". No in this case they would be an error. Sometimes conflicts are not correctly managed by ZTM (no rollbacks in db) Examples? Which bug reports? Regards Tino _

Re: [Zope] How can run multiple query in an Z sql method

2007-03-09 Thread Jary Busato
If I understood you're telling me that begin and commit statements are "redundant". Sometimes conflicts are not correctly managed by ZTM (no rollbacks in db) Marco Bizzarri ha scritto: On 3/9/07, Jary Busato <[EMAIL PROTECTED]> wrote: Yes, I must do it when I need to know an autonumber PK af

Re: [Zope] How can run multiple query in an Z sql method

2007-03-09 Thread Marco Bizzarri
On 3/9/07, 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 SELECT LAST_INSERT_ID() as lastid commit Then, a DTML method: Make the insert an

Re: [Zope] How can run multiple query in an Z sql method

2007-03-09 Thread Jary Busato
My only need is to be sure to keep the right id; I did'nt use this method for other operations. You sayd that it's not recommended but I don't understand why in this simple context. Andreas Jung ha scritto: --On 9. März 2007 15:30:23 +0100 Jary Busato <[EMAIL PROTECTED]> wrote: Yes, I must

Re: [Zope] How can run multiple query in an Z sql method

2007-03-09 Thread Andreas Jung
--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 SELECT LAST_INSERT_ID() as lastid commit Sorry, but you must be crazy

Re: [Zope] How can run multiple query in an Z sql method

2007-03-09 Thread Jary Busato
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 SELECT LAST_INSERT_ID() as lastid commit Then, a DTML method:   Make the insert and write the id returned by the select. Illorca Gaute Amun

Re: [Zope] How can run multiple query in an Z sql method

2007-03-09 Thread Gaute Amundsen
On Friday 09 March 2007 10:12, Remil Mathew wrote: > Hi, > How can run multiple query in an Z sql method.. I am using Mysql.. > Also is there any method to return a value from insert query? > > Thanks > Remil could you possibly be thinking of? insert foo into bar SELECT LAST_INSERT_ID() gaute

Re: [Zope] How can run multiple query in an Z sql method

2007-03-09 Thread Tino Wildenhain
Andreas Jung schrieb: --On 9. März 2007 14:42:57 +0530 Remil Mathew <[EMAIL PROTECTED]> wrote: Hi, How can run multiple query in an Z sql method.. Sure. SQL Statement just have to separated by . I am using Mysql.. Also is there any method to return a value from insert query? An insert

Re: [Zope] How can run multiple query in an Z sql method

2007-03-09 Thread Andreas Jung
--On 9. März 2007 14:42:57 +0530 Remil Mathew <[EMAIL PROTECTED]> wrote: Hi, How can run multiple query in an Z sql method.. Sure. SQL Statement just have to separated by . I am using Mysql.. Also is there any method to return a value from insert query? An insert statement does not retu

[Zope] How can run multiple query in an Z sql method

2007-03-09 Thread Remil Mathew
Hi, How can run multiple query in an Z sql method.. I am using Mysql.. Also is there any method to return a value from insert query? Thanks Remil ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML