This topic is locked

Add new record to second table

8/16/2007 3:13:40 PM
ASPRunnerPro General questions
D
deeg author

I have two tables
T_Initial Request - Date, Division, Title, KeyInitialRequest(Primary Key)

T_Status - CreateDate, KeyInitialRequest(common key), StatusDescription (default value of pending)
After adding a new record to 'T_InitialRequest'

I want to be able to automatically add a new record in T_Status with a default value for the CreateDate and StatusDescription.
Thanks... <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=question&id=6005&image=1&table=forumtopics' class='bbc_emoticon' alt=':blink:' />

Sergey Kornilov admin 8/16/2007

Use BeforeAdd or AfterAdd event and sample action Insert a record into another table

D
deeg author 8/22/2007

Use BeforeAdd or AfterAdd event and sample action Insert a record into another table



I am a novice with ASP. Can you provide me with the code for setting up the actual fields. For some reason the example does not help me.

I want to take 'KeyInitReqNum' (join field) from T_InitReq and copy it into a second table, ' T_Status' along with the UserID field from the first table to the 'S_UserID field in the second table. I also want to set the value of another field in the second table 'Status' to 'awaiting approval'. This is the default setting for the field if I were manually generating the record. Will it manually generate even though I am automating the record creation?
thanks in advance...

Sergey Kornilov admin 8/22/2007

You need to contact support directly at support@xlinesoft.com with more details.
Without seeing your database structure there is nothing that can be done.