Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Getting periodic "General network error"

Status
Not open for further replies.

olichap

Programmer
Mar 20, 2001
389
0
0
US
Has anyone else been getting periodic

System.Data.SqlClient.SqlException: General network error. Check your network documentation.

errors when an app tries to connect to the sql server?

I've been getting them on Win2000 and XP machines. Things are running along fine, everyone's connected, then the error occurs. The only way to fix the problem is reboot the computer or disable the network card (and then enable it again).

Thanks,

Oli
 
Hi,

I get the same error, but only when I execute a certain SP.

I am using SQL Server 7.0 with VS.net (VB and C# apps)

It does not always happen, but once it appears it persists until I reboot or disable-re-enable like you mentioned.

I have a few items I plan to try.

One: I do not have this problem when I run SPs from a unique program thread (VS.net). I plan to experiment with threading for the SP in question. Maybe it does not like running on the main program thread!

Two: Disable resource pooling, for OLEDB add "OLE DB Services = -2" to your connect string.

Three: I plan to run both client side and server side traces to determine when/where I am loosing my connection. This will take some time because i have never done it before. First time is always a charm!

You can contact me at ken.cleveland@patronERP.net

Any help is welcome!
Thanks
Ken

 
Hi,

How are you guys connecting to the SQL serves. are you using a data adapter and sqlconnector or straight ADO. another thing to do is to see how are you connecting to sql server named pipes or tcp/ip. also make sure you are running the latest version of ado.
HTH,
bueller
 
I have not had this problem but I have followed some threads on the subject. Check out the one below to see if it is the same solution.


DotNetDoc
M.C.S.D.
---------------------------------------

Tell me and I forget. Show me and I remember. Involve me and I understand.
- Anonymous Chinese Proverb
-----------------------------------
If you can't explain it simply, you don't understand it well enough.
- A. Einstein
 
Thanks DotNetDoc

I will review my SP with this in mind.

Bueller,

My connection is as follows:

strConnection = "Data Source=" & M_Server & ";Initial Catalog=" & M_Database & ";User Id=" & UserID & ";Password=" & p_Pwd & ";"

cn = New SqlClient.SqlConnection(strConnection)

I am using TCP/IP at the Client. I am checking into the server. My guess is it is the default setting when SQL Server was installed.

Thanks
Ken

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top