multiple updates in SP

multiple updates in SP

Post by Topol_Shea » Sat, 04 Aug 2001 20:19:56



Hi all,

Sorry if this has already been asked or is way too simple,  but I need to
update data in one table from another, with multiple records.  I understand
the simple update statement, but when it gets to updating multiple records
in one update, I am having problems.

Any help would be much appreciated.

Many thanks

T

 
 
 

multiple updates in SP

Post by Topol_Shea » Sat, 04 Aug 2001 23:29:15


ignore me!

Quote:> Hi all,

> Sorry if this has already been asked or is way too simple,  but I need to
> update data in one table from another, with multiple records.  I
understand
> the simple update statement, but when it gets to updating multiple records
> in one update, I am having problems.

> Any help would be much appreciated.

> Many thanks

> T


 
 
 

1. multiple sets of data to one sp for batch updating

Is there any way to pass multiple values to a stored procedure as a set of values. For example I'd have an application that must do multiple saves of data...this set of data first, then a second and third set of data. But I currently have the VB code to run the first update, then the second then third, but if the 2nd or 3rd fails, because it is in VB, the first save is still there.

How do I pass the 2nd and 3rd set of data to the stored procedure so that it will run all the updates in one large batch. That way if one part fails, the whole thing will rollback? I'm new to all this SQL/VB stuff.

the vb currently uses RDO and the application is fairly large (I'm managing code from a previous programmer)

*********************************************************
Rayne Bair

2. sp_attach_db

3. Multiple SPs OR one SP w/ Multiple Recordsets (Part 2)

4. Hints needed: student database

5. Recordset--join tables in different data sources?

6. Multiple SPs or single SP with multiple selects?

7. Stored proc question (return)

8. updating multiple databases on multiple servers with DTC

9. Update on Multiple Records from Multiple Tables

10. UPDATE with multiple records per updated record?

11. update multiple tables by using single update query

12. UPDATE trigger - multiple rows affected by update