0
multi step form with 3 tables
New Here
,
/t5/coldfusion-discussions/multi-step-form-with-3-tables/td-p/53684
Aug 04, 2006
Aug 04, 2006
Copy link to clipboard
Copied
Hi:
I have a database with 3 tables. Table 1 has one-to-many relationship with two others. Infact in table 1 user should enter his basic info and details will be submited itno two other tables.
Is there any easy way to make it with colfusion?
I know that session may help but it is needed that each page can submit information (if the user doesn't fill the last form them I may loose data with session)
I thought of sending information to other page with form action="page.cfm" but my problem is I don't know how to submit information in the second form that the primary key of table one becoms the foreign key of the next page. Please please I really need this. I really need it. Is there any tutorial or easy way for it that I can make it fast. As I said it is an emeregncy for me.
Thanks
Benign
I have a database with 3 tables. Table 1 has one-to-many relationship with two others. Infact in table 1 user should enter his basic info and details will be submited itno two other tables.
Is there any easy way to make it with colfusion?
I know that session may help but it is needed that each page can submit information (if the user doesn't fill the last form them I may loose data with session)
I thought of sending information to other page with form action="page.cfm" but my problem is I don't know how to submit information in the second form that the primary key of table one becoms the foreign key of the next page. Please please I really need this. I really need it. Is there any tutorial or easy way for it that I can make it fast. As I said it is an emeregncy for me.
Thanks
Benign
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
LEGEND
,
/t5/coldfusion-discussions/multi-step-form-with-3-tables/m-p/53685#M5591
Aug 05, 2006
Aug 05, 2006
Copy link to clipboard
Copied
Why don't you put the 3 insert queries on the same
page?
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
Participant
,
/t5/coldfusion-discussions/multi-step-form-with-3-tables/m-p/53686#M5592
Aug 07, 2006
Aug 07, 2006
Copy link to clipboard
Copied
I think i understand what your asking, but I need to know
what Database you are using? If you are using MSSQL, you can select
@@identity, which will be the primary key for the last item
inserted in the db. If you have a different db, let me know and Ill
tell you how to do it.
Mike
Mike
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
Benign
AUTHOR
New Here
,
/t5/coldfusion-discussions/multi-step-form-with-3-tables/m-p/53687#M5593
Aug 07, 2006
Aug 07, 2006
Copy link to clipboard
Copied
Hi:
For now I use MS Access (to make things easier) so please let me know how I can make such registration wizard.
thanks a lot
Benign
For now I use MS Access (to make things easier) so please let me know how I can make such registration wizard.
thanks a lot
Benign
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
Benign
AUTHOR
New Here
,
/t5/coldfusion-discussions/multi-step-form-with-3-tables/m-p/53688#M5594
Aug 08, 2006
Aug 08, 2006
Copy link to clipboard
Copied
Hi:
For the present application I use MS Access (to make things easier). It will be very great if you let me know how I can make such registration wizard.
Thanks
Benign
For the present application I use MS Access (to make things easier). It will be very great if you let me know how I can make such registration wizard.
Thanks
Benign
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
Participant
,
/t5/coldfusion-discussions/multi-step-form-with-3-tables/m-p/53689#M5595
Aug 08, 2006
Aug 08, 2006
Copy link to clipboard
Copied
What you do is make your first insert, then right after that,
you do a select like the following to get the value of the PK you
just inserted:
SELECT MAX(PK) AS pk1
FROM tblABC
WHERE firstfield(db)=firstfield(form), secondfield(db)=secondfield(form), etc for ALL or most fields you insert previously.
pk1 will now be the Primary Key value of the line you just inserted. You can keep that in a variable via hidden input, or in the url for when you go to the next page, and repeat the process.
SELECT MAX(PK) AS pk1
FROM tblABC
WHERE firstfield(db)=firstfield(form), secondfield(db)=secondfield(form), etc for ALL or most fields you insert previously.
pk1 will now be the Primary Key value of the line you just inserted. You can keep that in a variable via hidden input, or in the url for when you go to the next page, and repeat the process.
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
Benign
AUTHOR
New Here
,
/t5/coldfusion-discussions/multi-step-form-with-3-tables/m-p/53690#M5596
Aug 08, 2006
Aug 08, 2006
Copy link to clipboard
Copied
Hi:
Thanks a lot for the reply.
I think I got what you suggested. But as I am a novice in programming can you please give me an example code somewhere in the internet?
I searched for it everywhere but no way!!!
Thanks again.
Benign
Thanks a lot for the reply.
I think I got what you suggested. But as I am a novice in programming can you please give me an example code somewhere in the internet?
I searched for it everywhere but no way!!!
Thanks again.
Benign
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
Participant
,
LATEST
/t5/coldfusion-discussions/multi-step-form-with-3-tables/m-p/53691#M5597
Aug 10, 2006
Aug 10, 2006
Copy link to clipboard
Copied
Well the example I posted is the only time ive had to do it,
and all I changed were variable names. Why dont you use that
example to give it a try, and if it doesnt work, then post your
nonworking code here, and Ill help you sort out the problem...The
more code you post, with more specific information, the better we
can help you.
-Mike
-Mike
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more

