Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Master Detail Transaction

Author  Topic 

amirbkk
Starting Member

1 Post

Posted - 2007-02-10 : 04:10:15
Hi dears,

I m new in this forum.

I have problem with my DB. I need to make a transaction which will run online.
I have two tables OrderMaster(Master Tbl) OrderDetails(Detail tbl)
I am taking orders online , i want to add e.g 1 order with many records in single transaction.
i m confuse with how multiple detail data with one master data will be run in single transaction.

i m using VB and SQL Server 2000

Plz help guys.

Regards,
Amir



Amir

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2007-02-10 : 06:19:05
[code]
begin trans
insert into OrderMaster . . .
insert into OrderDetails . . .
commit trans
[/code]


KH

Go to Top of Page

Kristen
Test

22859 Posts

Posted - 2007-02-11 : 05:26:41
Or possibly:

begin trans
insert into OrderMaster . . .
Loop
insert into OrderDetails . . .
EndLoop
commit trans

Kristen
Go to Top of Page
   

- Advertisement -