473,387 Members | 1,585 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,387 software developers and data experts.

MS -SQL Server 2000 -connection closes randomly

Hi,

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

Function1()
{
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;
break;
}
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
not
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?

Thanks
Rings
Jul 20 '05 #1
0 1430

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

Similar topics

2
by: Ananta | last post by:
Hi I am having a problem with the SQL server connected in VC#.net I am using the SQLDataAdaptors to access and fill the data to the DataSets. There are certain pages in sequence which run...
1
by: vighnesh | last post by:
Hi All I am dealing a project in ASP.NET in which I have to establish a connection to SQL Server 2000 database,where the database was located on a remote system. For this I have used...
4
by: tangokilo | last post by:
Hi I published the problem below some days earlier in xxx.dotnet.languages.vb.data and got no response. So I try here, maybe someone can help me! When developing on stand alone PC using VB...
6
by: Todd Brewer | last post by:
Windows Server 2000 ASP.NET 2.0 SQL Server 2000 (on a physically seperate server) I moved an ASP.NET 2.0 application from a development server to production, and am getting the following error:...
0
by: tamayi | last post by:
I have a problem (like most others posting issues on this forum :) ) I have a remote server running Windows XP SP2, with both SQL Server 2005 Express with Advanced Features and SQL 2000...
5
by: OJ | last post by:
Hi, I am at a loss here, I have a c# asp.net website which connects to a remote SQL Server 2000 db via a connection string. If I set the website up in the filesystem and use the inbuilt cassini...
1
by: finn clement hansen | last post by:
Hi group, being pretty new to setting up sql server, I am stuck. Have installed sql 2000 server on Win 2000 server, IIS 5.0. I try to connect via ASP script that looks like this: <% Set...
1
by: Vikram S | last post by:
Hi All, I have an ASP.NET 2.0 web application on a web server and a separate machine for SQL Server 2000 Database. I am using a Connectionstring based on Sql Authentication to connect to the...
1
jamesd0142
by: jamesd0142 | last post by:
Can any one help me connect a a server and retrieve information from a DB usin vb.net and sql server 2000? server: ELWADB1 Table: Post16 Possible using windows authentication, otherwise any...
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...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

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.