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=click
_______________________________________________
DbForms Mailing List

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

Reply via email to