General network error. Check your network documentation.

  • Thread starter Thread starter Buddy
  • Start date Start date
B

Buddy

Hello,

I'm getting the following error when running a large SQL.
I am using the SqlCommand and calling the ExecuteNonQuery
with the CommandTimeout set to 0.

Here is the example of the code

sqlCommand = new SqlCommand(m_SQLBuffer, (SqlConnection)
m_connection);
sqlCommand.CommandTimeout=0;
//I GET THE EXCEPTION ON THE LINE BELOW
m_numOfRowAffected = sqlCommand.ExecuteNonQuery();
//
//Throws an exception of System.SystemException {"General
network error. Check your network documentation."}

Does anyone know what this exception means?

Thanks
 
Connecting to the sql server fails for some odd reason? Maybe it gets
broken mid query or something.
Sorry, can't really help. Use a try/catch statement to get a more
descriptive error message.
 
Hello,

There are'nt any broken queries and I have used the
try/catch which provided the error information.

Thanks,
 
Can you execute any other query to the database?
I get a feeling that while ExecuteNonQuery is waiting for the result it
looses touch with the server.
 
Could you have a look in the directory where SQL Server places its logs.
Last time I had such an error, it was due to a real crash of MSSQL and I had
a SQL dump in it.

José
 
I can execute other queries but when I try and excecute
queries that takes at least 5 minutes I get the exception.

Thanks,
 
Back
Top