Passsing New Values

J

Jonathan

Hi,

I am probably not thinking laterally, but here goes.......

I am writing a program that starts with 1 asp page to input call details,
when the user clicks next I want the details to save to a database table pass
the UID to a new asp page so that the user can then add linked information.

I know how to link data that already exsists in a database but don't know
how to do it from an initial input page where a record does not existing yet
in the db - does that make sense?

e.g. the user creates a UID in form 1 to write to table 1 in the db, when
the users click next the data in the form writes to table1 in the db but
passes the UID to form 2 which writes to table 2 in the db and so
on....................... each time passing the previous pages UID (from the
original form 1) to the next.

I can't think of a clearer way of putting it, any help will be greatly
appreciated!

Tia

Jonathan
 
J

Jim Buyens

I presume that you're working in ASP or ASP.NET, and that:

o If you detect an error in the input, you let the same
page reappear with an error mesasge.
o If there are no errors, you Response.Redirect to the
second page in the series.

If so, when you redirect, specify the UID string in the
query string portion of the URL, as shown below:

Response.Redirect "secondpage.aps?uid=" & strUID

where strUID contains the UID value you want. In secondpage.asp, the
expression Request.QueryString("uid") would retrieve the passed value.

Jim Buyens
Microsoft FrontPage MVP
http://www.interlacken.com
Author of:
*----------------------------------------------------
|\---------------------------------------------------
|| Microsoft Windows SharePoint Services Inside Out
|| Microsoft Office FrontPage 2003 Inside Out
||---------------------------------------------------
|| Web Database Development Step by Step .NET Edition
|| Microsoft FrontPage Version 2002 Inside Out
|| Faster Smarter Beginning Programming
|| (All from Microsoft Press)
|/---------------------------------------------------
*----------------------------------------------------
 
Top