Get ready for BLACK FRIDAY shopping starting in

Forums

ASP

This topic is locked

ASP VB Script (Pages Synchronisation)

Posted 14 Mar 2005 11:10:17
1
has voted
14 Mar 2005 11:10:17 Olatunde Baruwa posted:
I have two pages(insert records form) using the same table with an auto genarating id(one).After adding the record on the first page,it generates an id but going to the next page,it generates another id for the same record.How do i synchronise the two pages in order to have the same id for the same record?Do I have to pass a parameter?Please,help me out with this.

Thanks for the response to the other question.

Replies

Replied 14 Mar 2005 12:42:28
14 Mar 2005 12:42:28 Simon Martin replied:
Question - why do you want to submit the data two times?
From the look of your other post you are building a preview then submit form. In which case you wouldn't do your insert on the 1st page - just pass everything to the 2nd page in the form collection as Vince says and <i>then</i> do the insert.

Or you could use George's Insert Record With Identity www.dmxzone.com/showDetail.asp?TypeId=3&NewsId=195 - now you can get the ID for the record you've just created and pass that back to your 2nd page so that you can UPDATE the new record based on the ID number (or create child relationships to other tables)

Live the life you love
Love the life you live
~ ~ ~ ~ ~ ~ ~
<b>Simon Martin</b> - <i>DMXzone Manager</i>
<font size=1>[ Dreamweaver MX/MX2004 | ASP | SQL | XHTML/CSS | Web Accessibility ] </font id=size1>

Reply to this topic