|
| |
|
|
truwebs
Posts: 80 Joined: 7/10/2006 Status: offline
|
Insert to Parent and Child Table SQL Statement - 4/12/2007 10:23:33
Can somebody direct me on proper syntax of SQL statement to insert into one table that has child table in a relational database? I can get the insert to work for the Parent, but a record also needs to be inserted into the Child. Below is an example of my tables. I get Table 1 to insert no problem. What I need is table 2 to populate based on the catID from table 1 which is primarty key and selected imgID from table 3. Thanks for your help. EX. Table 1 catID imgID venID Table 2 catID imgID Table 3 imgID imgName
|
|
|
|
truwebs
Posts: 80 Joined: 7/10/2006 Status: offline
|
RE: Insert to Parent and Child Table SQL Statement - 4/13/2007 17:34:11
I agree with you but, how do I do this? All I have found is that I need to do a Select @@ Identity after the insert into table 1. I am trying to do this with the .net framework using VB and an Access database. Just don't know how to proceed with use of the Select@@Identity. TRU
|
|
New Messages |
No New Messages |
Hot Topic w/ New Messages |
Hot Topic w/o New Messages |
Locked w/ New Messages |
Locked w/o New Messages |
|
Post New Thread
Reply to Message
Post New Poll
Submit Vote
Delete My Own Post
Delete My Own Thread
Rate Posts
|
|
|