Sure. Will get back to you when it's done.

Lihui

-----Original Message-----
From: Henner Kollmann [mailto:[EMAIL PROTECTED]
Sent: December 1, 2005 1:08 PM
To: Pang, Lihui
Cc: jdbforms-interest@lists.sourceforge.net
Subject: RE: [dbforms] It's possible to get key by generator?


 Maybe you could implement this and send me the patch?



> -----Original Message-----
> From: Pang, Lihui [mailto:[EMAIL PROTECTED] 
> Sent: Thursday, December 01, 2005 6:52 PM
> To: Henner Kollmann
> Cc: jdbforms-interest@lists.sourceforge.net
> Subject: RE: [dbforms] It's possible to get key by generator?
> 
> That's fine. It would be great if there will have a patch or 
> if this will be added in next build/release. 
> 
> Thanks for your support.
> 
> Lihui
> 
> 
> -----Original Message-----
> From: Henner Kollmann [mailto:[EMAIL PROTECTED]
> Sent: December 1, 2005 12:47 PM
> To: Pang, Lihui
> Cc: jdbforms-interest@lists.sourceforge.net
> Subject: RE: [dbforms] It's possible to get key by generator?
> 
> 
>  I would prefer the solution with the params for each table. 
> It's more general and the work to integrate it is nearly the same.
> 
> Otherwise tommorow will somebody come and ask for another 
> special attribute... :-)
> 
> Regards,
> Henner
> 
> 
> > -----Original Message-----
> > From: [EMAIL PROTECTED]
> > [mailto:[EMAIL PROTECTED] On Behalf Of 
> > Pang, Lihui
> > Sent: Wednesday, November 30, 2005 5:03 PM
> > To: Pang, Lihui
> > Cc: jdbforms-interest@lists.sourceforge.net
> > Subject: RE: [dbforms] It's possible to get key by generator?
> > 
> > It would be great if this can be added to DBForm as a optional 
> > attribte in Field. Thus I don't need to add this patch in 
> each DBForm 
> > release.
> > 
> > Thanks,
> > Lihui
> > 
> > 
> > 
> > -----Original Message-----
> > From: [EMAIL PROTECTED]
> > [mailto:[EMAIL PROTECTED]
> > Behalf Of Pang, Lihui
> > Sent: November 30, 2005 10:16 AM
> > To: Henner Kollmann
> > Cc: jdbforms-interest@lists.sourceforge.net
> > Subject: RE: [dbforms] It's possible to get key by generator?
> > 
> > 
> > Since it's key related, I put it in Field. It should be declared 
> > together with isKey attribute. It works fine. Thanks for 
> your support.
> > 
> > Lihui
> > 
> > -----Original Message-----
> > From: Henner Kollmann [mailto:[EMAIL PROTECTED]
> > Sent: November 30, 2005 2:59 AM
> > To: Pang, Lihui
> > Cc: jdbforms-interest@lists.sourceforge.net
> > Subject: AW: [dbforms] It's possible to get key by generator?
> > 
> > 
> > I use firebird...
> > 
> > What's about adding a param collection to the table/query? 
> > There you can add as much parameters you want and use them in your 
> > interceptor code. Dbforms only will transport them.
> > 
> > Henner
> > 
> > > -----Ursprüngliche Nachricht-----
> > > Von: Pang, Lihui [mailto:[EMAIL PROTECTED]
> > > Gesendet: Dienstag, 29. November 2005 21:48
> > > An: Henner Kollmann
> > > Betreff: RE: [dbforms] It's possible to get key by generator?
> > > 
> > > Thanks for quick reply.
> > > 
> > > Actually this query works well in my Oracle database. I've
> > added this
> > > in the preInsert handle (but with Hard-Code) and it works 
> fine. My 
> > > problem is since each table has its own sequence table, I
> > am thinking
> > > it would be good to put the sequence table name in the 
> config file. 
> > > When DBForm process insert, it just do what it suppose to
> > do (get the
> > > name from the Field, construct the query and get the key
> > back)without
> > > knowing which sequence table.
> > > 
> > > I am modifying the source now to see if it works. Please
> > let me know
> > > if adding this attribute will affect others.
> > > 
> > > 
> > > Thanks again.
> > > 
> > > Lihui
> > > 
> > > 
> > > -----Original Message-----
> > > From: Henner Kollmann [mailto:[EMAIL PROTECTED]
> > > Sent: November 29, 2005 3:37 PM
> > > To: Pang, Lihui
> > > Subject: RE: [dbforms] It's possible to get key by generator?
> > > 
> > > 
> > > This will work only:
> > > 
> > > 1. With oracle. E.g. will not work with this query 2. If
> > your database
> > > design has a sequence for each table. Mine has has 
> sequence for the 
> > > whole database.
> > > 
> > > So this will not fit into the dbforms kernel.
> > > 
> > > But you can write your own preInsert handler wich will
> > fetch a new key
> > > value from the dabase and put it into the fieldValue list. Then 
> > > navigation will work.
> > > 
> > > Regards,
> > > Henner
> > > 
> > > > -----Original Message-----
> > > > From: Pang, Lihui [mailto:[EMAIL PROTECTED]
> > > > Sent: Tuesday, November 29, 2005 9:24 PM
> > > > To: Henner Kollmann
> > > > Cc: jdbforms-interest@lists.sourceforge.net
> > > > Subject: RE: [dbforms] It's possible to get key by generator?
> > > > 
> > > > Henner,
> > > > 
> > > > I think using generator in DBForm will be a nice 
> feature and it's 
> > > > quite common in current database design. The query is
> > quite simple:
> > > > "SELECT " + tableName + "_SEQ.NEXTVAL FROM SYS.DUAL";
> > > tableName is the
> > > > sequence table name I suggest to pass in as Field attribute 
> > > > (optional).
> > > > 
> > > > Lihui
> > > > 
> > > > 
> > > > 
> > > > -----Original Message-----
> > > > From: Henner Kollmann [mailto:[EMAIL PROTECTED]
> > > > Sent: November 29, 2005 3:17 PM
> > > > To: Pang, Lihui
> > > > Cc: jdbforms-interest@lists.sourceforge.net
> > > > Subject: RE: [dbforms] It's possible to get key by generator?
> > > > 
> > > > 
> > > > That will only work for specific databases - not in general.
> > > > Or do you now a method which will work with standard sql?
> > > > 
> > > > Henner
> > > > 
> > > > > -----Original Message-----
> > > > > From: [EMAIL PROTECTED]
> > > > > [mailto:[EMAIL PROTECTED] On
> > > Behalf Of
> > > > > Pang, Lihui
> > > > > Sent: Tuesday, November 29, 2005 8:41 PM
> > > > > To: jdbforms-interest@lists.sourceforge.net
> > > > > Subject: [dbforms] It's possible to get key by generator?
> > > > > 
> > > > > Hi,
> > > > > 
> > > > > I check the DBspec 2.5. It looks like there is no way to
> > > > get the key
> > > > > by the generator. I suggest to add one more attribute in
> > > > Field class
> > > > > called generatorName. The generatorName is the sequence
> > > table name
> > > > > which is used to generate the key of a certain table.
> > > > > 
> > > > > 
> > > > > Lihui
> > > > > 
> > > > > 
> > > > 
> > > 
> > 
> > 
> > 
> > -------------------------------------------------------
> > This SF.net email is sponsored by: Splunk Inc. Do you grep 
> through log 
> > files for problems?  Stop!  Download the new AJAX search 
> engine that 
> > makes searching your log files as easy as surfing the  web. 
>  DOWNLOAD 
> > SPLUNK!
> > http://ads.osdn.com/?ad_idv37&alloc_id865&op=ick
> > _______________________________________________
> > DbForms Mailing List
> > 
> > http://www.wap-force.net/dbforms
> > 
> > 
> > -------------------------------------------------------
> > This SF.net email is sponsored by: Splunk Inc. Do you grep 
> through log 
> > files for problems?  Stop!  Download the new AJAX search 
> engine that 
> > makes searching your log files as easy as surfing the  web. 
>  DOWNLOAD 
> > SPLUNK!
> > http://ads.osdn.com/?ad_idv37&alloc_id865&op=ick
> > _______________________________________________
> > DbForms Mailing List
> > 
> > http://www.wap-force.net/dbforms
> > 
> 



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_idv37&alloc_id865&op=click
_______________________________________________
DbForms Mailing List

http://www.wap-force.net/dbforms

Reply via email to