Hi guys, hope you can help me out on this. Sorry if this is the wrong group
to post to. I was not sure if I should post to here or the ADO group. But
my problem is that when I am trying to connect to SQL Server I am getting
the error:

-2147467259 - [DBMSSOCN]General network error. Check your network documentation.

Now, I do not get the error on the same line of code all the time. It can
be on a different line, in a different function, and I do not get it when
I step through the code, and sometimes it works perfectly. It generally
gives the error in one of the functions *after* I open a different form and
execute a stored procedure that returns records. I have several functions
that return values retrieved from SQL Server. Here is a sample of what one
of the functions looks like:

Function Get_Product_FBMCONV(ByVal pID As Long) As Double
On Error GoTo errH
Dim rs As ADODB.Recordset

Set rs = New ADODB.Recordset
rs.CursorLocation = adUseClient
= " & pID, "Provider=SQLOLEDB;Server=TestServer;Database=BayridgeTest;
Trusted_Connection=No;UID=sa;PWD;", adOpenStatic, adLockReadOnly,
Set rs.ActiveConnection = Nothing

If rs.EOF Then Get_Product_FBMCONV = 0 Else Get_Product_FBMCONV = rs!FBMCONV
Set rs = Nothing
If Err <> 0 Then If ErrP("Get_Product_FBMCONV", Err) = 0 Then Resume
Next Else Resume
End Function

Now, I do get an error on the server when attempting to connect to SQL Server
either through Query Analyzer or Enterprise Manager. That error is:

A connection could not be established to "ServerName" - Specified driver
could not be loaded due to system error 126 (SQL Server)

I do not know if that error would cause the previous error. I do not have
a problem connecting from my development machine to the server, using either
Query Analyzer or Enterprise Manager. I have looked on Microsofts site for
any help, but to no avail so far. Sorry for being so long winded.

Thanks for any help,