This topic is locked

Create new record with data from another table

9/20/2004 11:39:51 AM
ASPRunnerPro General questions
V
visual author

Looking at a record (Table A) in 'View' Mode, I would like to create a button to add a new record in Table B based on some fields of the record in Table A.
How do I create this button in TableA_view.asp and how do I parse some of the fields into the new transaction TableB_add.asp. The 'Copy Function' once discussed in this forum could be a creative approach to this, albeit not that 'clean'.
Any ideas greatly welcomed.
Erich

Sergey Kornilov admin 9/20/2004

Erich,
I can suggest to save all recordset values to Session variables on the View page. After that you will be able to retrieve and use these values on the ADD page.

V
visual author 9/26/2004

Many thanks.
I have been able to sucessfully populate and parse the session variables using hidden fields in the new table and setting the default value to the value of the session variables.
Your input is very welcomed and very helpful.