On Wed, 10 Mar 2004 14:41:14 +0100 (CET), Ivan Codarin <[EMAIL PROTECTED]> wrote:

Dear All,
I've a trouble with dbforms (1.1.4pr2 20031213).
I have to create a form with this features

- it has a field ID, autoInc=true, type=int, iskey=true
This ID identifies a person during a process of registration of personal
information.

So,
my form must start with a "insert-mode" WITHOUT clicking any
"navNewButton", without a ID (it's generated from a sequence in
postgresql).
When the user clicks on "next" GotoButton (with autoUpdate) or with a
(Update/Insert button) the form has to store his info on the DB and then
followup to the next step of registration.



I'm not able to read the ID generated from the database to create the "next step".


In an pre update interceptor, you will have all the data except the ID generated from the database. I
would store that someplace to get it later-- probably in the session. Then in a post update interceptor,
you can get that info from the session and query the database--> select ID from yourTable where (and then
here use all the info you saved). Then put the ID in the session, and clear the other information as it is no longer needed. Finally in the next step of registration, the ID you need to know is in the session.


The only problem I see would be if that information (the stuff you
stored) could return more than one ID. But I think you must have other keys too because an autoInc ID as the only key couldn't keep users differentiated.


And I don't know how to create a "direct-insert" form (i tried creating a
whereClause that extracts no records and than using a insertButton).

Not sure on this one. Anyone else?




--
Shawn

Happily using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/


------------------------------------------------------- This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click _______________________________________________ DbForms Mailing List

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

Reply via email to