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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Error: 'General network error. Check your network documentation.'

Status
Not open for further replies.

RebLazer

Programmer
Jun 7, 2002
438
US
This error has truly got me puzzled:
"General network error. Check your network documentation."

I get it on the following (red) line of code:[tt]

Dim word_scores As SqlDataReader = output_results_da.SelectCommand.ExecuteReader()
output_results_da.SelectCommand.Parameters.Clear()

While word_scores.Read
scoring_matrix_sl.Add(word_scores("key_word"), word_scores("score_value"))

End While

word_scores.Close()[/tt]

The reason I find this so strange is that it works sometimes (minority of the time) and not other times (majority of the time) - with ostensibly nothing at all changing from run to run.

Our network guy knows of no problems with the network - and I'm able to ping all of the servers with acceptable response time.

Has anyone seen this before???

Please help!!!

Thanks,
Lazer
 
I forgot to mention - when I said that sometimes it works and sometimes it doesn't that with:

1) no changes in the VB/SQL code
and
2) the identical data

!!!

:-|
Lazer
 

And just in case this might help, here's the FULL error message (can you tell I really would like someone to answer this post???)

TIA!
Lazer
[tt]

See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
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.ReadEncodingChar(Int32 length, Encoding encoding)
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.GetValue(Int32 i)
at System.Data.SqlClient.SqlDataReader.get_Item(String name)
at Grant_Selection.Menu.get_word_scores(SortedList& scoring_matrix_sl, String matrix_type) in C:\IDT_STARTEAM\BusDev\Projects\Grant Database\Source Code\Grant selection - machine learning\Menu.vb:line 1651
at Grant_Selection.Menu.apply_matrix_to_grants(Int32 scoring_run_id) in C:\IDT_STARTEAM\BusDev\Projects\Grant Database\Source Code\Grant selection - machine learning\Menu.vb:line 1547
at Grant_Selection.Menu.scoring_run_btn_Click(Object sender, EventArgs e) in C:\IDT_STARTEAM\BusDev\Projects\Grant Database\Source Code\Grant selection - machine learning\Menu.vb:line 1409
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


************** Loaded Assemblies **************
mscorlib
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.573
CodeBase: file:///c:/winnt/microsoft.net/framework/v1.1.4322/mscorlib.dll
----------------------------------------
Grant Selection
Assembly Version: 1.0.1447.28964
Win32 Version: 1.0.1447.28964
CodeBase: file:///C:/IDT_STARTEAM/BusDev/Projects/Grant%20Database/Source%20Code/Grant%20selection%20-%20machine%20learning/bin/Grant%20Selection.exe
----------------------------------------
System.Windows.Forms
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.573
CodeBase: file:///c:/winnt/assembly/gac/system.windows.forms/1.0.5000.0__b77a5c561934e089/system.windows.forms.dll
----------------------------------------
System
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.573
CodeBase: file:///c:/winnt/assembly/gac/system/1.0.5000.0__b77a5c561934e089/system.dll
----------------------------------------
System.Drawing
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.573
CodeBase: file:///c:/winnt/assembly/gac/system.drawing/1.0.5000.0__b03f5f7f11d50a3a/system.drawing.dll
----------------------------------------
System.Xml
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.573
CodeBase: file:///c:/winnt/assembly/gac/system.xml/1.0.5000.0__b77a5c561934e089/system.xml.dll
----------------------------------------
Microsoft.VisualBasic
Assembly Version: 7.0.5000.0
Win32 Version: 7.10.3052.4
CodeBase: file:///c:/winnt/assembly/gac/microsoft.visualbasic/7.0.5000.0__b03f5f7f11d50a3a/microsoft.visualbasic.dll
----------------------------------------
System.Data
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.573
CodeBase: file:///c:/winnt/assembly/gac/system.data/1.0.5000.0__b77a5c561934e089/system.data.dll
----------------------------------------
Accessibility
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.573
CodeBase: file:///c:/winnt/assembly/gac/accessibility/1.0.5000.0__b03f5f7f11d50a3a/accessibility.dll
----------------------------------------
System.EnterpriseServices
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.573
CodeBase: file:///c:/winnt/assembly/gac/system.enterpriseservices/1.0.5000.0__b03f5f7f11d50a3a/system.enterpriseservices.dll
----------------------------------------

************** JIT Debugging **************
To enable just in time (JIT) debugging, the config file for this
application or machine (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
<system.windows.forms jitDebugging=&quot;true&quot; />
</configuration>

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the machine
rather than being handled by this dialog.[/tt]
 
Just some ideas to try:

1. See what version of SQL you have. I don't know for sure, but maybe if you have an older version it might not gracefully handle sql statements from the new ado.net? Check microsoft site to see if there any known compatibility issues with older versions of SQL and .net.

2. From your .net applicaton box try to do a
ping (sqlserveripaddress) -n 200
Maybe you are droping packets?

3. Check the memory and processor utilization on the sql server. Is it possible that maybe it is maxed out on one or the other? I have seen SQL server do some strange things once it uses up the memory in a server.
 
Intrex,

Thanks for your reply.

1) We're running SQL Server 2000 - and all of our .NET apps have always run just fine. So that's probably not it.

2) I am able to ping the server with an average of 15 ms. Seems ok.

3) Our DBA tells me that is not the case.

... ??? !!!

Nonetheless, thanks for your reply. :)
Lazer
 
Have you tried to put the application on the same physical machine as the sql server? By doing this you can figure out if the problem is a network issue or application issue.
 
Does this happen on someone else's machine -- someone who has a different brand of network card? Could be the drivers for your NIC are the cause.

Chip H.


If you want to get the best response to a question, please check out FAQ222-2244 first
 
One other thing - are you connected to a switch or a hub? If a switch - make sure you have the auto-negotiation option turned off in your network settings (it probably should be 100mbs half-duplex, but check with your network guy). When the NIC and the switch attempt to negotiate a speed, sometimes they do it wrong. Usually this results in a PC that only occasionally is able to connect at login, but sometimes it causes problems even after the PC has been running for a while.

Chip H.


If you want to get the best response to a question, please check out FAQ222-2244 first
 
RebLazer,

Had a similar problem in some database conversion code I was writing. Googled and got this thread...

However, also found the following blog:

Basically, if connection pooling is on and the underlying connection gets reset/has an error, you won't see the exception on the connection.open call, but you will on a subsequent read.

In my instance, I was able to turn connection pooling off in my connection string and was able to more easily fix my issues.

HTH,

B.J.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top