F
Farrukh
Hi All!
I have a problem when connecting to a remote SQL Server
database through .NET Sql Data Provider (using
system.data.sqlclient).
The situation is that the client machine's network
connection is explicitly broken once after successfull
retrival of records
from the database.
So when the following line of code runs after the
connection is broken:
sqlConnection.Open();
....it dont gives any exception. However after that the
exception is raised when querying the database. i.e. at:
sqlDataAdapter.Fill(dataTable);
...
(Note that Connection Pooling is enabled)
Exception raised is:
"General network error. Check your network documentation."
Stack Trace:
at System.Data.SqlClient.SqlCommand.ExecuteReader
(CommandBehavior cmdBehavior, RunBehavior runBehavior,
Boolean returnStream)
at System.Data.SqlClient.SqlCommand.ExecuteReader
(CommandBehavior behavior)
at
System.Data.SqlClient.SqlCommand.System.Data.IDbCommand.Ex
ecuteReader(CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.FillFromCommand
(Object data, Int32 startRecord, Int32 maxRecords, String
srcTable,
IDbCommand command, CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataTable
dataTable, IDbCommand command, CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataTable
dataTable)
at ....
Kindly help me finding a solution to handle this problem.
Looking forward
Regards,
Farrukh
I have a problem when connecting to a remote SQL Server
database through .NET Sql Data Provider (using
system.data.sqlclient).
The situation is that the client machine's network
connection is explicitly broken once after successfull
retrival of records
from the database.
So when the following line of code runs after the
connection is broken:
sqlConnection.Open();
....it dont gives any exception. However after that the
exception is raised when querying the database. i.e. at:
sqlDataAdapter.Fill(dataTable);
...
(Note that Connection Pooling is enabled)
Exception raised is:
"General network error. Check your network documentation."
Stack Trace:
at System.Data.SqlClient.SqlCommand.ExecuteReader
(CommandBehavior cmdBehavior, RunBehavior runBehavior,
Boolean returnStream)
at System.Data.SqlClient.SqlCommand.ExecuteReader
(CommandBehavior behavior)
at
System.Data.SqlClient.SqlCommand.System.Data.IDbCommand.Ex
ecuteReader(CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.FillFromCommand
(Object data, Int32 startRecord, Int32 maxRecords, String
srcTable,
IDbCommand command, CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataTable
dataTable, IDbCommand command, CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataTable
dataTable)
at ....
Kindly help me finding a solution to handle this problem.
Looking forward
Regards,
Farrukh