Connecting SQL Server from VB Error

  • Hi All,

    I am facing the following error while connecting to SQL Server from VB

    "Server Driver][DBNETLIB]ConnectionRead (recv()"

    It has a strnage behaviour that sometime it appears very frequently and then disappears.

    Also i appears after some time and it comes when i try to run a very small size query, so nothing wrong with the size of the Data.

    Thanks in Advance.

    Kidn Regards,

    Affan

  • hi, can you post the code you use to connect. Security information removed.

  • I had similar error (not DBNETLIB) connecting to SQL7 in DMZ behind firewall and could not find any reason.

    I changed my code to populate the recordset before processing the contents and I have not had the error since. I did not have to change any connection details. I believe SQL7 SP4 has a least one fix for network problems of this type.

    Far away is close at hand in the images of elsewhere.
    Anon.

  • Also, check your Client Networking Utility for SQL if installed if you are using the defined name in the connection parameter that is stored in CLU. Make sure is a TCP/IP connection and not using Dynamically determine port, assign the port. I got this previously and that was what I changed. I believe it was using named pipes initially.

  • I have checked all this stuff as it was working perfectly till now and suddenly it has started throwing the error which worries me a lot.

    Regards,

    Affan

  • Since my previous reply, today one of my apps got Error -2147467259 [Microsoft][ODBC SQL Server Driver][TCP/IP Sockets]ConnectionRead (recv()).

    This is the first one for two months. The app was 8 minutes into processing (multiple recordsets) using a single connection. So I think the problem is not the initial connection but a broken connection.

    Following Antares686 suggestion I rechecked the CNU (which has not changed) and found it was using Dynamically determine port. I have changed this and wait to see what happens.

    Far away is close at hand in the images of elsewhere.
    Anon.

  • Did anyone figure this out? I am getting the same error intermittently in ASP since moving the SQL server behind a firewall.

    [Microsoft][ODBC SQL Server Driver][TCP/IP Sockets]ConnectionRead (recv()).

  • Since my last reply, I have updated my SQL7 to SP4 and MDAC 2.7 RTM (2.70.9001.0) (5 Jan 03). Only got this error once due to me force closing sql on the server. My server is behind a firewall also and the error is very intermittent so will not know if I have cured it yet.

    Sorry I can't be of any more help but I as frustrated as you with the error and never getting to the bottom of it (I even go our network guy involved with monitoring our firewall).

    Far away is close at hand in the images of elsewhere.
    Anon.

  • If this is really a network error, maybe you can try connecting using another client library (e.g. named pipes). If this is possible with your configuration of course.

  • Unfortunately named pipes doesn't work through a firewall. Is there a method to make it work?

Viewing 10 posts - 1 through 9 (of 9 total)

You must be logged in to reply to this topic. Login to reply