470,836 Members | 1,784 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,836 developers. It's quick & easy.

MS -SQL Server 2000 -connection closes randomly


We have some console application which runs in background with the
following logical flow :
loop (1..n)

Open SQLConnection;
Loop Till No Data Found
Fetch N Records;
For Each of N Records
Begin Transaction;
Do DB Activity on the current record (Update);
If Last operation Failed
DB Rollback;
If CommitFrequency reached
DB Commit;
Close SQLConnection;

After successfully executing some random number of records, the
connection object is abruptly closing (In the line marked RED). It is
giving "Connection Closed" exception on ExecuteQuery() call. Sometimes
it is giving "Reader is already closed" while doing any Get()
operation on the SQLReader object.

We are using
VS.Net 1.0 with SP4
SQLServer 2000(no SPs)

1) We are making a direct call to SQL server from the App Layer and
using COM+ .. to maintain transactions. Transactions are maintained
purely by the Conn transaction Object.

2) We have not specified any TimeOut property in the ConnectionString.
(Anyway also tried giving a huge value just for testing).
Is there any default timeout that is there in MS SQL and if yes how to
offset it?

Jul 20 '05 #1
0 1346

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by tangokilo | last post: by
6 posts views Thread by Todd Brewer | last post: by
1 post views Thread by finn clement hansen | last post: by
1 post views Thread by Vikram S | last post: by
reply views Thread by mihailmihai484 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.