Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Transaction needed to update 3 linked tables at same time

Status
Not open for further replies.

andybazz

Programmer
Nov 15, 2012
1
GB
Hi,

I am having a problem writing a transaction to UPDATE 3 linked tables at the same time from a single form.

Example

table 1
col1ID PK
col2ID FK Table 2.Col1ID
col3ID FK Table 3.Col1ID
col4
col5....

table 2
Col1ID PK
Col2
Col3

table 3
Col1ID PK
Col2
Col3

I have written a transaction to read the data back from these multiple tables to the user form(which works perfectly) but am having problems UPDATE-ing the tables, has anyone got any ideas or pointers - would be much appreciated
 
Not sure what your question is. You don't need a transaction when querying data. However, if you are updating multiple tables, then you should always use a transaction.
By the looks of your question you are using a transaction in ASP.NET code. Is this correct. If so, I would write a stored procedure and put your transaction code in there.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top