General Network Error

B

BuddyWork

I get the following exception when doing a simple
statement like SELECT * FROM MyTable, I am using SQL
Server 2000 and ADO.Net as the client using framework
1.1, I get this error periodiodically.

Please help,

Exception message:

iE.AM.Runtime.AMSQLException: Unable to perform SqlCmd ---
System.Data.SqlClient.SqlException: General network
error. Check your network documentation.
at System.Data.SqlClient.SqlConnection.OnError
(SqlException exception, TdsParserState state)
at System.Data.SqlClient.SqlInternalConnection.OnError
(SqlException exception, TdsParserState state)
at
System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning()
at System.Data.SqlClient.TdsParser.ReadNetlib(Int32
bytesExpected)
at System.Data.SqlClient.TdsParser.ReadBuffer()
at System.Data.SqlClient.TdsParser.ReadByteArray(Byte
[] buff, Int32 offset, Int32 len)
at System.Data.SqlClient.TdsParser.ReadDouble()
at System.Data.SqlClient.TdsParser.ReadValue
(_SqlMetaData md, Int32 length)
at System.Data.SqlClient.TdsParser.ProcessRow
(_SqlMetaData[] columns, Object[] buffer, Int32[] map,
Boolean useSQLTypes)
at System.Data.SqlClient.SqlDataReader.PrepareRecord
(Int32 i)
at System.Data.SqlClient.SqlDataReader.GetValues(Object
[] values)
at
iE.AM.Sql.Utilities.SqlBase.ProcessSqlCurOpenOperation
(Object param)
--- End of inner exception stack trace ---: General
network error. Check your network documentation.: at
System.Data.SqlClient.SqlConnection.OnError(SqlException
exception, TdsParserState state)
at System.Data.SqlClient.SqlInternalConnection.OnError
(SqlException exception, TdsParserState state)
at
System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning()
at System.Data.SqlClient.TdsParser.ReadNetlib(Int32
bytesExpected)
at System.Data.SqlClient.TdsParser.ReadBuffer()
at System.Data.SqlClient.TdsParser.ReadByteArray(Byte
[] buff, Int32 offset, Int32 len)
at System.Data.SqlClient.TdsParser.ReadDouble()
at System.Data.SqlClient.TdsParser.ReadValue
(_SqlMetaData md, Int32 length)
at System.Data.SqlClient.TdsParser.ProcessRow
(_SqlMetaData[] columns, Object[] buffer, Int32[] map,
Boolean useSQLTypes)
at System.Data.SqlClient.SqlDataReader.PrepareRecord
(Int32 i)
at System.Data.SqlClient.SqlDataReader.GetValues(Object
[] values)
at
iE.AM.Sql.Utilities.SqlBase.ProcessSqlCurOpenOperation
(Object param)
 
N

Nicholas Paldino [.NET/C# MVP]

Buddy,

Periodically? Is it possible that the server could be offline (for some
reason or another)? I assume that you are not getting this because of an
authentication issue (i.e. you are in ASP.NET running under the ASPNET
local user account).

--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

BuddyWork said:
I get the following exception when doing a simple
statement like SELECT * FROM MyTable, I am using SQL
Server 2000 and ADO.Net as the client using framework
1.1, I get this error periodiodically.

Please help,

Exception message:

iE.AM.Runtime.AMSQLException: Unable to perform SqlCmd ---
System.Data.SqlClient.SqlException: General network
error. Check your network documentation.
at System.Data.SqlClient.SqlConnection.OnError
(SqlException exception, TdsParserState state)
at System.Data.SqlClient.SqlInternalConnection.OnError
(SqlException exception, TdsParserState state)
at
System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning()
at System.Data.SqlClient.TdsParser.ReadNetlib(Int32
bytesExpected)
at System.Data.SqlClient.TdsParser.ReadBuffer()
at System.Data.SqlClient.TdsParser.ReadByteArray(Byte
[] buff, Int32 offset, Int32 len)
at System.Data.SqlClient.TdsParser.ReadDouble()
at System.Data.SqlClient.TdsParser.ReadValue
(_SqlMetaData md, Int32 length)
at System.Data.SqlClient.TdsParser.ProcessRow
(_SqlMetaData[] columns, Object[] buffer, Int32[] map,
Boolean useSQLTypes)
at System.Data.SqlClient.SqlDataReader.PrepareRecord
(Int32 i)
at System.Data.SqlClient.SqlDataReader.GetValues(Object
[] values)
at
iE.AM.Sql.Utilities.SqlBase.ProcessSqlCurOpenOperation
(Object param)
--- End of inner exception stack trace ---: General
network error. Check your network documentation.: at
System.Data.SqlClient.SqlConnection.OnError(SqlException
exception, TdsParserState state)
at System.Data.SqlClient.SqlInternalConnection.OnError
(SqlException exception, TdsParserState state)
at
System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning()
at System.Data.SqlClient.TdsParser.ReadNetlib(Int32
bytesExpected)
at System.Data.SqlClient.TdsParser.ReadBuffer()
at System.Data.SqlClient.TdsParser.ReadByteArray(Byte
[] buff, Int32 offset, Int32 len)
at System.Data.SqlClient.TdsParser.ReadDouble()
at System.Data.SqlClient.TdsParser.ReadValue
(_SqlMetaData md, Int32 length)
at System.Data.SqlClient.TdsParser.ProcessRow
(_SqlMetaData[] columns, Object[] buffer, Int32[] map,
Boolean useSQLTypes)
at System.Data.SqlClient.SqlDataReader.PrepareRecord
(Int32 i)
at System.Data.SqlClient.SqlDataReader.GetValues(Object
[] values)
at
iE.AM.Sql.Utilities.SqlBase.ProcessSqlCurOpenOperation
(Object param)
 
B

BuddyWork

Thanks for the reply,

The server is not offline because we can get this to work
from another PC connecting to the SQL Server and it works
without a problem. But for some reason on this box it
just gives this error. The request does work sometimes
and then it fails so I cannot see why the authentication
would be an issue.

Thanks,
-----Original Message-----
Buddy,

Periodically? Is it possible that the server could be offline (for some
reason or another)? I assume that you are not getting this because of an
authentication issue (i.e. you are in ASP.NET running under the ASPNET
local user account).

--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

I get the following exception when doing a simple
statement like SELECT * FROM MyTable, I am using SQL
Server 2000 and ADO.Net as the client using framework
1.1, I get this error periodiodically.

Please help,

Exception message:

iE.AM.Runtime.AMSQLException: Unable to perform SqlCmd ---
System.Data.SqlClient.SqlException: General network
error. Check your network documentation.
at System.Data.SqlClient.SqlConnection.OnError
(SqlException exception, TdsParserState state)
at System.Data.SqlClient.SqlInternalConnection.OnError
(SqlException exception, TdsParserState state)
at
System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning()
at System.Data.SqlClient.TdsParser.ReadNetlib(Int32
bytesExpected)
at System.Data.SqlClient.TdsParser.ReadBuffer()
at System.Data.SqlClient.TdsParser.ReadByteArray (Byte
[] buff, Int32 offset, Int32 len)
at System.Data.SqlClient.TdsParser.ReadDouble()
at System.Data.SqlClient.TdsParser.ReadValue
(_SqlMetaData md, Int32 length)
at System.Data.SqlClient.TdsParser.ProcessRow
(_SqlMetaData[] columns, Object[] buffer, Int32[] map,
Boolean useSQLTypes)
at System.Data.SqlClient.SqlDataReader.PrepareRecord
(Int32 i)
at System.Data.SqlClient.SqlDataReader.GetValues (Object
[] values)
at
iE.AM.Sql.Utilities.SqlBase.ProcessSqlCurOpenOperation
(Object param)
--- End of inner exception stack trace ---: General
network error. Check your network documentation.: at
System.Data.SqlClient.SqlConnection.OnError (SqlException
exception, TdsParserState state)
at System.Data.SqlClient.SqlInternalConnection.OnError
(SqlException exception, TdsParserState state)
at
System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning()
at System.Data.SqlClient.TdsParser.ReadNetlib(Int32
bytesExpected)
at System.Data.SqlClient.TdsParser.ReadBuffer()
at System.Data.SqlClient.TdsParser.ReadByteArray (Byte
[] buff, Int32 offset, Int32 len)
at System.Data.SqlClient.TdsParser.ReadDouble()
at System.Data.SqlClient.TdsParser.ReadValue
(_SqlMetaData md, Int32 length)
at System.Data.SqlClient.TdsParser.ProcessRow
(_SqlMetaData[] columns, Object[] buffer, Int32[] map,
Boolean useSQLTypes)
at System.Data.SqlClient.SqlDataReader.PrepareRecord
(Int32 i)
at System.Data.SqlClient.SqlDataReader.GetValues (Object
[] values)
at
iE.AM.Sql.Utilities.SqlBase.ProcessSqlCurOpenOperation
(Object param)


.
 
D

David Sworder

BuddyWork said:
I get the following exception when doing a simple
statement like SELECT * FROM MyTable, I am using SQL
Server 2000 and ADO.Net as the client using framework
1.1, I get this error periodiodically.

I've had this problem for years with the SQL Server managed provider.
It'll work for a while and then every now and then (maybe once out of every
100 queries) it'll throw this "General Network Error" exception. I remember
doing a tremendous amount of research on this problem a while back and I was
able to find a few other people that were experiencing the same thing. In
each case, the solution was the same: Use the OLEDB managed provider instead
of the SQL Server managed provider.

This bug in the SQL Server managed provider seems to affect very few
people, however. This exception that you're seeing is usually the result of
a network problem -- perhaps something as simple as a bad cable. I've also
seen the exception be thrown (intermittently) when the connection string
uses a hostname instead of an IP address and the hostname is resolved using
a windows DNS server. In this case, changing your connection string to use
an IP address instead of a hostname will solve the problem. Again, this is a
VERY rare problem which may not apply to you.

I really do hate intermittant errors like this though...frigging
annoying.

David
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top