Menu

#28 Connection lost if the client is idle for some time

open
nobody
None
5
2005-10-17
2005-10-17
Anonymous
No

When there is no interaction with the server for
sometime, and then if the client executes a command,
it gives exception...

My code is like this :

if (sqlDB.connection.State !=
System.Data.ConnectionState.Open)
{
// connect to db
}

// build the sql command
.....
dataAdapter.Fill();

If the client is left idle for sometime and later if it tries to
execute a command using the above code, then
"dataAdapter.Fill" raises an exception.

What could be the problem??

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.