Re: [SQLObject] how to get generator number

2007-11-08 Thread Petr Jakeš
On Nov 8, 2007 11:33 AM, Oleg Broytmann [EMAIL PROTECTED] wrote: On Thu, Nov 08, 2007 at 11:29:01AM +0100, Petr Jake?? wrote: Anyway I thing I have to catch the idSequence which is used as a primary key in the master tabel record (row) because I need to insert this value to the detail

Re: [SQLObject] how to get generator number

2007-11-07 Thread Oleg Broytmann
On Wed, Nov 07, 2007 at 11:30:13PM +0100, Petr Jake?? wrote: I would like to use IDs generated by generator in my application. SQLObject either allows the user to generate an ID (outside of SQLObject) or delegates the job of generating an ID to the connection. If you want to generate an ID at

[SQLObject] how to get generator number

2007-11-07 Thread Petr Jakeš
Hi, I would like to use IDs generated by generator in my application. I am using Firebird DB. Now I go like: genVal = connection.queryOne(SELECT GEN_ID( GEN_PERSON, 1 ) FROM RDB$DATABASE) or for Firebird 2.0 genVal = connection.queryOne(SELECT NEXT VALUE FOR GEN_PERSON FROM RDB$DATABASE) Is

Re: [SQLObject] how to get generator number

2007-11-07 Thread Oleg Broytmann
On Wed, Nov 07, 2007 at 11:51:04PM +0100, Petr Jake?? wrote: I just wondered if there is a method within the SQLObject to do this job. There is, but it is rather complex. You have to create your own connection class whose _queryInsertID() will do the job internally. Oleg. -- Oleg

Re: [SQLObject] how to get generator number

2007-11-07 Thread Petr Jakeš
I would like to use IDs generated by generator in my application. SQLObject either allows the user to generate an ID (outside of SQLObject) or delegates the job of generating an ID to the connection. If you want to generate an ID at the backend and pass it to INSERT queries you can

Re: [SQLObject] how to get generator number

2007-11-07 Thread Petr Jakeš
On Nov 7, 2007 11:53 PM, Oleg Broytmann [EMAIL PROTECTED] wrote: On Wed, Nov 07, 2007 at 11:51:04PM +0100, Petr Jake?? wrote: I just wondered if there is a method within the SQLObject to do this job. There is, but it is rather complex. You have to create your own connection class whose