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

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.SqlClient.SqlException' occurred
in system.data.dll

Additional Information: System error.

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

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 2646
Hi,

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

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

Ken
----------------
"Mike" <th********@yahoo.com> wrote in message
news:Cp******************@tornado.texas.rr.com...
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.SqlClient.SqlException' occurred
in system.data.dll

Additional Information: System error.

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

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.SqlException
"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(ClientListDS1)
Catch ex as exception
messagebox.show(ex.tostring)
end try

Ken
----------------
"Mike" <th********@yahoo.com> wrote in message
news:Cp******************@tornado.texas.rr.com...
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.SqlClient.SqlException' occurred
in system.data.dll

Additional Information: System error.

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

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.SqlClient.SqlException: Cannot generate SSPI context.
at System.Data.SqlClient.ConnectionPool.GetConnection (Boolean&
isInTransaction)
at
System.Data.SqlClient.SqlConnectionPoolManager.Get PooledConnection(SqlConnectionString
options, Boolean& isInTransaction)
at System.data.SqlClient.SqlConnection.Open()
at System.Data.Common.DbDataAdapter.QuietOpen(IDbConn ection connection,
ConnectionState& originalState)
at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32
startRecord, Int32 maxRecords, String srcTable, IDbCommand command,
CommandBehavior)
at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet)
at WindowsApplication2.Form1.Form1_Load(Object sender, EventArgs e) in
C:\vbdotnet\testapps\WindowsApplication2\Form1.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***@bellsouth.net> wrote in message
news:Om**************@TK2MSFTNGP15.phx.gbl...
Hi,

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

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

Ken
----------------
"Mike" <th********@yahoo.com> wrote in message
news:Cp******************@tornado.texas.rr.com...
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.SqlClient.SqlException'
occurred
in system.data.dll

Additional Information: System error.

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

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

"Zorpiedoman" <no*********@beatles.com> wrote in message
news:68**********************************@microsof t.com...
Or better yet catch a SQLexception type for the best info:

Catch ex as SqlClient.SqlException
"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(ClientListDS1)
Catch ex as exception
messagebox.show(ex.tostring)
end try

Ken
----------------
"Mike" <th********@yahoo.com> wrote in message
news:Cp******************@tornado.texas.rr.com...
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.SqlClient.SqlException'
occurred
in system.data.dll

Additional Information: System error.

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

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********@yahoo.com> schrieb
It is returning:
System.Data.SqlClient.SqlException: Cannot generate SSPI context.
at System.Data.SqlClient.ConnectionPool.GetConnection (Boolean&
isInTransaction)
at
System.Data.SqlClient.SqlConnectionPoolManager.Get PooledConnection(SqlConnectionString
options, Boolean& isInTransaction)
at System.data.SqlClient.SqlConnection.Open()
at System.Data.Common.DbDataAdapter.QuietOpen(IDbConn ection
connection, ConnectionState& originalState)
at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32
startRecord, Int32 maxRecords, String srcTable, IDbCommand command,
CommandBehavior)
at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet)
at WindowsApplication2.Form1.Form1_Load(Object sender, EventArgs
e) in C:\vbdotnet\testapps\WindowsApplication2\Form1.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.public.dotnet.framework.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 connectiontimeout.
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****************@TK2MSFTNGP15.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 connectiontimeout.
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
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...
1
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: ...
2
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...
2
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...
1
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...
0
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...
6
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...
0
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,...
6
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...
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
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,...

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.