473,385 Members | 1,409 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

C# SqlConnection question in SQL Server 2000

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[i].Transaction, TestCommand[i].ExecuteNonQuery().
Will this cause problems in our SQL Server 2000? What should I pay
attention to?
Thanks for help.
Jason
Jun 23 '06 #1
2 1310
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]
- mv*@spam.guard.caspershouse.com

"Jason Huang" <Ja************@hotmail.com> wrote in message
news:%2******************@TK2MSFTNGP04.phx.gbl...
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[i].Transaction,
TestCommand[i].ExecuteNonQuery().
Will this cause problems in our SQL Server 2000? What should I pay
attention to?
Thanks for help.
Jason

Jun 23 '06 #2
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[i]'s ExecuteNonQuery
fails, the Rollback in the SQL Server has some problems and the whole SQL
Server 2000 just hanged.
"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> ¼¶¼g©ó¶l¥ó·s»D:O6**************@TK2MSFTNGP05.phx.g bl...
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]
- mv*@spam.guard.caspershouse.com

"Jason Huang" <Ja************@hotmail.com> wrote in message
news:%2******************@TK2MSFTNGP04.phx.gbl...
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[i].Transaction,
TestCommand[i].ExecuteNonQuery().
Will this cause problems in our SQL Server 2000? What should I pay
attention to?
Thanks for help.
Jason


Jun 24 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Stephen | last post by:
I'm experiencing a strange problem that has me baffled. I created a webservice with a webmethod that connects to a remote MS SQL Server. It works fine when connecting to one server (running SQL...
3
by: Ludvig | last post by:
This Exception is executed when using SQLConnection. OleDbConnection connects fine. System.EnterpriseServices.Platform.Initialize() +503...
2
by: StephenRichter | last post by:
I have SqlServer loaded on my w2k system. The freeby I just downloaded from MS. Within WebMatrix I created a database. called it "WebMatrix" In WebMatrix I connect to the database. server:...
4
by: Steve Richter | last post by:
I really miss c++ .... I have an SqlConnection object within my Web.UI.Page object. The thinking is that the connection to the database server is opened once when the page starts to do its...
4
by: Curtis | last post by:
Which is preferred or what is the difference? SQLConnection or OLEDbConnection. We are connecting to data in MSSQL2000 primarily through stored procedures.
15
by: sflynn | last post by:
I've just created a new program in Visual Studio 2005, Visual Basic. I can publish, install, and run the program just fine as long as the user is a member of the "Domain Admins" group. My problem...
2
by: RvGrah | last post by:
My program is giving a strange exception at startup, only on client machines. Runs fine on development machine. The app was upgraded long ago from a 2003 version to a VS2005 version, but continued...
4
by: Victor | last post by:
Hi Guys I have a problem here. I want to improve the performance for a website. When I looked into the system, I have found that the system made the "SqlConnection Object" static. That mean only...
4
by: =?Utf-8?B?VG9kZCBKYXNwZXJz?= | last post by:
Hey guys, I've written a web application that I'm simply trying to use to access a database. When I run the application locally (or as an NT Service) it can easily access the remote SQL...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.