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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do i update Multiple Records from Different Tables In VB

Status
Not open for further replies.

Giantkiller

Programmer
Sep 25, 2000
2
PH
We are new to RDBMS using VB/SQL, and i would like to know if there is an easy way that i could update data in multiple tables in the SQL Server database with one statement or query, because ive used the Update method in VB but i doesnt seen to work and i receive an error telling me that i cannot update one or more fields in different table. [sig][/sig]
 
Sorry, one table at a timefor updates.

If you need to make sure that either:

1) Both tables get updated

or

2) Neither table gets updated.

Have a look at transaction control, that's a way of &quot;tucking away&quot; updates until you're sure it's all gone ok. If it works you then COMMIT your updates and if something fails you ROLLBACK the updates. [sig]<p>Mike<br><a href=mailto:michael.j.lacey@ntlworld.com>michael.j.lacey@ntlworld.com</a><br><a href= Cargill's Corporate Web Site</a><br>Making mistakes, so you don't have to. &lt;grin&gt;[/sig]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top