C# SqlConnection question in SQL Server 2000

  • Thread starter Thread starter Jason Huang
  • Start date Start date
J

Jason Huang

Hi,

In our C# windows application, if we build up a SqlCommand array, saying
TestCommand [20].
And in the SqlCommand array, later on we try each TestCommand[0], ...,
TestCommand[19],
by testing the TestCommand.Transaction, TestCommand.ExecuteNonQuery().
Will this cause problems in our SQL Server 2000? What should I pay
attention to?
Thanks for help.


Jason
 
Jason,

It shouldn't be a problem on SQL Server 2000. Why do you think there
would be a problem? Is there a specific concern you have?
 
Thanks Nicholas.
We have a SqlTransaction MyTrans, it is myConn.BeginTransaction().
All SqlCommand's ExecuteNonQuery on this MyTrans, if it doesn't work, the
MyTrans has to be Rollback.
Sayiny the TestCommand[0], ..., TestCommand[5].

But now the situation is if one of the TestCommand's ExecuteNonQuery
fails, the Rollback in the SQL Server has some problems and the whole SQL
Server 2000 just hanged.


Nicholas Paldino said:
Jason,

It shouldn't be a problem on SQL Server 2000. Why do you think there
would be a problem? Is there a specific concern you have?


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

Jason Huang said:
Hi,

In our C# windows application, if we build up a SqlCommand array, saying
TestCommand [20].
And in the SqlCommand array, later on we try each TestCommand[0], ...,
TestCommand[19],
by testing the TestCommand.Transaction,
TestCommand.ExecuteNonQuery().
Will this cause problems in our SQL Server 2000? What should I pay
attention to?
Thanks for help.


Jason

 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top