I want all of my transaction code within my stored procedure, but not in VC#. How can I do that?
Main Topics
Browse All TopicsHi
I have a VC# program which needs to
1. select data from multiple tables
2. update data for multiple tables
3. insert data for multiple tables
1. How should I write one transaction stored procedure to include all of the select, update and insert queries?
2. How to make sure first come first in? i.e. process the store procedure one by one
3. How to write
IF @@ERROR > 0 OR @@ROWCOUNT <> 1
BEGIN
IF @@TRANCOUNT = 1
ROLLBACK TRANSACTION
ELSE
COMMIT TRANSACTION
RETURN 1
END
ELSE
BEGIN
COMMIT TRANSACTION
RETURN 0
END
Since there are over 100 queries in one second, how to solve the huge traffic and ensure the concurrency of the data?
I use VC#, MSSQL 2005 server and ASP.NET
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
>1. How should I write one transaction stored procedure to include all of the select, update and insert queries?
a stored procedure can have plenty of sql code inside of it, I don't see the "problem"
>2. How to make sure first come first in? i.e. process the store procedure one by one
t-sql is sequential, so having 2 statements after each other will get them executed one after the other
>3. How to write ...
let me show you how to do:
Business Accounts
Answer for Membership
by: gregoryyoungPosted on 2009-02-22 at 18:38:14ID: 23707836
I am guessing that you are using ado.net see http://msdn.microsoft.com/ en-us/libr ary/867735 66.aspx
Cheers,
Greg