transaction with unknown nbr of commands

Tech-Archive recommends: Fix windows errors by optimizing your registry



Using vb.net for code behind on a asp.net application.

I need to run a number of sqlcommands, based on user input. The commands
need to run as a single transaction. The commands are all stored procedures.

How do I do this? I was thinking that I could build an array of the
sqlcommands, but I do not see how to do it. I looked at arraylist, but still
not sure.

Maybe the question could be stated as:
When I run a sqlcommand in a transaction, does the sqlcommand need to
persist, or can I just reuse it to run another stored procedure within the
same transaction?

.



Relevant Pages

  • Re: SqlCommandBuilder does not let me see the generated commands
    ... > I would like to be able to examine the SqlCommands generated by ... SqlCommandBuilder when passed a SqlDataAdapter that has its SelectCommand ... I can envision using SQL Profiler to ... Maybe a setting somewhere makes these commands ...
    (microsoft.public.dotnet.framework.adonet)
  • SQLDataAdapter.Update troubles.
    ... On parsing the execution of the commands in Sql ... The code for the SQLCommands was taken directly from the DataAdapter ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: How to build several SqlCommands on one SqlConnection?
    ... Lets say you have two commands, command1 and command2, you can always do ... HTH, ... In C# Windows Form, how to build several SqlCommands on one ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Many data components - use one transaction?
    ... You can simply not associate the SqlCommands with a SqlTransaction object if ... > (all must succeed or rollback). ... > should be able to perform an update without a transaction if desired. ...
    (microsoft.public.dotnet.framework.adonet)