473,672 Members | 2,953 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Losing SQL Connection

While working on a few projects I have this annoying issue whereby my
computer is losing the connection to my SQL database. I have to save my
work exit VS log out of windowsXP and log back in, relaunch VS and load my
program to resume. I'm getting the following error about every 10 minutes.

An unhandled exception of type 'System.Data.Sq lClient.SqlExce ption' occurred
in system.data.dll

Additional Information: System error.

The error ocurrs on this line:
SqlDataAdapter1 .Fill(ClientLis tDS1)

I'm hoping someone can shed some light on what may be causing this. The SQL
database is on a SBS2003 server.

Thanks,
Mike
Nov 21 '05 #1
7 2662
Hi,

Try enclosing the update command in a try catch block so you get
a better error message.

Try
SqlDataAdapter1 .Fill(ClientLis tDS1)
Catch ex as exception
messagebox.show (ex.tostring)
end try

Ken
----------------
"Mike" <th********@yah oo.com> wrote in message
news:Cp******** **********@torn ado.texas.rr.co m...
While working on a few projects I have this annoying issue whereby my
computer is losing the connection to my SQL database. I have to save my
work exit VS log out of windowsXP and log back in, relaunch VS and load my
program to resume. I'm getting the following error about every 10 minutes.

An unhandled exception of type 'System.Data.Sq lClient.SqlExce ption' occurred
in system.data.dll

Additional Information: System error.

The error ocurrs on this line:
SqlDataAdapter1 .Fill(ClientLis tDS1)

I'm hoping someone can shed some light on what may be causing this. The SQL
database is on a SBS2003 server.

Thanks,
Mike

Nov 21 '05 #2
Or better yet catch a SQLexception type for the best info:

Catch ex as SqlClient.SqlEx ception
"Ken Tucker [MVP]" wrote:
Hi,

Try enclosing the update command in a try catch block so you get
a better error message.

Try
SqlDataAdapter1 .Fill(ClientLis tDS1)
Catch ex as exception
messagebox.show (ex.tostring)
end try

Ken
----------------
"Mike" <th********@yah oo.com> wrote in message
news:Cp******** **********@torn ado.texas.rr.co m...
While working on a few projects I have this annoying issue whereby my
computer is losing the connection to my SQL database. I have to save my
work exit VS log out of windowsXP and log back in, relaunch VS and load my
program to resume. I'm getting the following error about every 10 minutes.

An unhandled exception of type 'System.Data.Sq lClient.SqlExce ption' occurred
in system.data.dll

Additional Information: System error.

The error ocurrs on this line:
SqlDataAdapter1 .Fill(ClientLis tDS1)

I'm hoping someone can shed some light on what may be causing this. The SQL
database is on a SBS2003 server.

Thanks,
Mike

Nov 21 '05 #3
It is returning:
System.Data.Sql Client.SqlExcep tion: Cannot generate SSPI context.
at System.Data.Sql Client.Connecti onPool.GetConne ction(Boolean&
isInTransaction )
at
System.Data.Sql Client.SqlConne ctionPoolManage r.GetPooledConn ection(SqlConne ctionString
options, Boolean& isInTransaction )
at System.data.Sql Client.SqlConne ction.Open()
at System.Data.Com mon.DbDataAdapt er.QuietOpen(ID bConnection connection,
ConnectionState & originalState)
at System.Data.Com mon.DbDataAdapt er.Fill(DataSet dataSet, Int32
startRecord, Int32 maxRecords, String srcTable, IDbCommand command,
CommandBehavior )
at System.Data.Com mon.DbDataAdapt er.Fill(DataSet dataSet)
at WindowsApplicat ion2.Form1.Form 1_Load(Object sender, EventArgs e) in
C:\vbdotnet\tes tapps\WindowsAp plication2\Form 1.vb:line1282

That was a lot of typing. So, most search results indicate that this is a
rights issue; however, I have tested various permission settings and have
not been able to resolve the issue. Also, it doesn't occur right away. - I
have access to the SQL data for about 10 minutes before I lose the
connection. I have my username set in AD for 'Account is trusted for
delegation' and the issue is reproducible while logged in as administrator
as well..... I'm at a loss....

Thanks,
Mike
"Ken Tucker [MVP]" <vb***@bellsout h.net> wrote in message
news:Om******** ******@TK2MSFTN GP15.phx.gbl...
Hi,

Try enclosing the update command in a try catch block so you
get
a better error message.

Try
SqlDataAdapter1 .Fill(ClientLis tDS1)
Catch ex as exception
messagebox.show (ex.tostring)
end try

Ken
----------------
"Mike" <th********@yah oo.com> wrote in message
news:Cp******** **********@torn ado.texas.rr.co m...
While working on a few projects I have this annoying issue whereby my
computer is losing the connection to my SQL database. I have to save my
work exit VS log out of windowsXP and log back in, relaunch VS and load my
program to resume. I'm getting the following error about every 10
minutes.

An unhandled exception of type 'System.Data.Sq lClient.SqlExce ption'
occurred
in system.data.dll

Additional Information: System error.

The error ocurrs on this line:
SqlDataAdapter1 .Fill(ClientLis tDS1)

I'm hoping someone can shed some light on what may be causing this. The
SQL
database is on a SBS2003 server.

Thanks,
Mike

Nov 21 '05 #4
Thanks,
I changed the catch statement but it returns the same results - see my
response to Ken for details on the error.

Thanks,
mike

"Zorpiedoma n" <no*********@be atles.com> wrote in message
news:68******** *************** ***********@mic rosoft.com...
Or better yet catch a SQLexception type for the best info:

Catch ex as SqlClient.SqlEx ception
"Ken Tucker [MVP]" wrote:
Hi,

Try enclosing the update command in a try catch block so you
get
a better error message.

Try
SqlDataAdapter1 .Fill(ClientLis tDS1)
Catch ex as exception
messagebox.show (ex.tostring)
end try

Ken
----------------
"Mike" <th********@yah oo.com> wrote in message
news:Cp******** **********@torn ado.texas.rr.co m...
While working on a few projects I have this annoying issue whereby my
computer is losing the connection to my SQL database. I have to save my
work exit VS log out of windowsXP and log back in, relaunch VS and load
my
program to resume. I'm getting the following error about every 10
minutes.

An unhandled exception of type 'System.Data.Sq lClient.SqlExce ption'
occurred
in system.data.dll

Additional Information: System error.

The error ocurrs on this line:
SqlDataAdapter1 .Fill(ClientLis tDS1)

I'm hoping someone can shed some light on what may be causing this. The
SQL
database is on a SBS2003 server.

Thanks,
Mike

Nov 21 '05 #5
"Mike" <th********@yah oo.com> schrieb
It is returning:
System.Data.Sql Client.SqlExcep tion: Cannot generate SSPI context.
at System.Data.Sql Client.Connecti onPool.GetConne ction(Boolean&
isInTransaction )
at
System.Data.Sql Client.SqlConne ctionPoolManage r.GetPooledConn ection(SqlConne ctionString
options, Boolean& isInTransaction )
at System.data.Sql Client.SqlConne ction.Open()
at System.Data.Com mon.DbDataAdapt er.QuietOpen(ID bConnection
connection, ConnectionState & originalState)
at System.Data.Com mon.DbDataAdapt er.Fill(DataSet dataSet, Int32
startRecord, Int32 maxRecords, String srcTable, IDbCommand command,
CommandBehavior )
at System.Data.Com mon.DbDataAdapt er.Fill(DataSet dataSet)
at WindowsApplicat ion2.Form1.Form 1_Load(Object sender, EventArgs
e) in C:\vbdotnet\tes tapps\WindowsAp plication2\Form 1.vb:line1282

That was a lot of typing.


Typing the callstack? Why not use the clipboard? :-)

Maybe the people in the ADO.net group can help you:
microsoft.publi c.dotnet.framew ork.adonet

Armin

Nov 21 '05 #6
Mike,

I assume that you are creating and disposing all the time your connection.
If not you can have a problem that there are to many connections active and
have problems with the pooling.

It can as well be your connectiontimeo ut.
http://msdn.microsoft.com/library/de...meouttopic.asp

I hope this helps,

Cor
Nov 21 '05 #7
Thanks Cor,
Disposing of the connection appears to have resolved the issue. I'm
surprised that (1) using the wizard to create the connection doesn't take
care of this automatically (2) the beginner books I am studying don't hit
this point emmediately (they mayy touch on it later in the books).
Nontheless, thank you for the help.

Mike

"Cor Ligthert" <no************ @planet.nl> wrote in message
news:%2******** ********@TK2MSF TNGP15.phx.gbl. ..
Mike,

I assume that you are creating and disposing all the time your connection.
If not you can have a problem that there are to many connections active
and have problems with the pooling.

It can as well be your connectiontimeo ut.
http://msdn.microsoft.com/library/de...meouttopic.asp

I hope this helps,

Cor

Nov 21 '05 #8

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

Similar topics

7
7784
by: vivek | last post by:
Do any of you guys have any idea what might be the reason for losing session variables, i was working on a page where i had to stroe a array in a session(trust me that was the only 'way' i could imagine doing it), and i am losing the session variable, its just returning empty values...does any one has any ideas?
1
3691
by: pleake | last post by:
Following is a logon.asp script. This script works when IIS is reset each day. The epapi object is a vendor api program I do not have the code for! The logon process involves three servers: the IIS server, a Novell Server with executable programs on it including the API program, and an Oracle server. The logon sequence is to use the IIS anonymous user account to access the Novell Server which in turn instructs the API programs as to...
2
1650
by: SOFTWARE | last post by:
If I do a the following using mysql_query SELECT * FROM cine_ticket_transaction WHERE performance_day='2004-10-28' AND film_name='Les miserable' If the record does not exist, I lose the connection with the mysql server. Any help appreciated. Maurice Breault
2
291
by: Frank Bishop | last post by:
Can someone tell me why I'm losing my session variable when using Response.Redirect? When I use the RedirectFromLoginPage method(currently remmed out below), my session variable works fine, but I'm trying this other way with Response.Redirect and it seems all my redirection works, but it loses the session variable when I hit the redirected pages. Help appreciated. Here is code: <code> <%@ Import Namespace="System.Data.OleDB" %> <%@...
1
2708
by: Matthew Curiale | last post by:
I have a ddl that is populated in my If Not IsPostBack block in the Page_load event. A repeater is also populated at this time, showing different domains for a website. The ddl contains different price plans that can be selected. My problem is that the user has a choice of being able to update information, or update and create a new domain. In doing either, if the user changes the index of the ddl, I lose all data in the ddl, and my...
0
978
by: Frank Bishop | last post by:
Can someone tell me why I'm losing my session variable when using Response.Redirect? When I use the RedirectFromLoginPage method(currently remmed out below), my session variable works fine, but I'm trying this other way with Response.Redirect and it seems all my redirection works, but it loses the session variable when I hit the redirected pages. Help appreciated. Thanks. Here is code: <code> <%@ Import Namespace="System.Data.OleDB" %>
6
1876
by: Sukh | last post by:
Hi, I am using ASP.Net with C#. My application is using a control and when control object is created my application set all the values to that control. This also contain connection string values. Control add connection string to session and rest values send to second application in XML format. Second application does some processing and return back to control. Here my control have to insert the return data to database but when I try to...
0
1260
by: =?Utf-8?B?Sm9obiBXLg==?= | last post by:
A client application connects to a TCP-remoted object from a service on localhost for method invocations and events. It works as advertised. But... if the network cable (LAN) gets disconnected, the event subscriptions to the localhost server are lost because "The connection was forcibly closed...". If the remoting proxy had also gone away, the client would detect it and begin trying to re-establish the connection. But it doesn't; the...
6
3108
MindBender77
by: MindBender77 | last post by:
Hello All - I've exhausted all other resources so any feed back will be most helpful. If this question is not in the correct forum, admins please move. I have an older Compaq Armada laptop and a Zoom cable modem. I can receive an internet connect for about 3 minutes before losing it. My desktop pc, when connected to the same modem has no issue. My first thought is the IP is not reassigning however, when I release and renew, the...
0
8418
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8940
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8840
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
7457
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6249
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4237
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4433
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2830
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2083
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.