![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hi I have a master table in SQL with its corresponding detail tables (more than one). I want to scan the master table and for each record I have to update other related tables, but when it finishes all the processing of one record, it should commit a transaction in order not to loose the whole work because just one record reported errors. I have sqldts.com article about looping through a recordset but I am getting confused when I want to add all the transaction logic. Can anyone help me at least in general how do I start??? I am a little bit messed up ! Thanks! Brenda.- |
#3
| |||
| |||
|
|
Hi Brenda, I am assuming you are using an ADO recordset, if that's the case then you can use BeginTrans, Rollbacktrans and CommitTrans. Have a look at: http://msdn.microsoft.com/library/de...adomethods.asp Ray "Brenda" wrote: Hi I have a master table in SQL with its corresponding detail tables (more than one). I want to scan the master table and for each record I have to update other related tables, but when it finishes all the processing of one record, it should commit a transaction in order not to loose the whole work because just one record reported errors. I have sqldts.com article about looping through a recordset but I am getting confused when I want to add all the transaction logic. Can anyone help me at least in general how do I start??? I am a little bit messed up ! Thanks! Brenda.- |
![]() |
| Thread Tools | |
| Display Modes | |
| |