Visual Basic ERROR - [Connection Open(Connect(),} SQL Server does not exist or access denied

  • Hi All

    I'm in the process of converting some VB 6 programs from using Access to SQL 2000. One of the update programs that I'm working with sends this error from time to time. Running the program in the debuggger, it happens randomly within the program.

    Please help and thanks

    Bill

  • Is there any more information available about the error?

  • Within the program I'm doing the following when the error happens:

    msgbox "Problem reading tablename" & err.number & err.description

    full output reads as follows:

    "Problem reading Subscritions table" -2147467259[DBNETLIB]

    [Connection Open (Connect()),] SQL Server does not exist or

    accesss denied

  • The error tells you that a connection with your SQL Server could not be established, this could be because the credentials supplied (Hostname, port, instance name etc) are not valid, or the communication is blocked via firewall, or SQL Server Service is not running on the server.

    Check that connection properties are accurate, check that SQL Server is running on the host, check that your firewall is not blocking your application or SQL Ports.

    In debug mode, place your cursor over all the variables in the connection string or connection object and validate their settings.  set a breakpoint at your message box and the line just past any connection.open, connection.execute, recordset.open etc.

    -

  • If this is happening after the connection is established, please ensure that connection is not broken before reading from table. Check connection.state property value. Also check the connection.connectionTimeout value. If your network is slow, set a higher value for this.


    Harsh
    India

    "Nothing Is Impossible"

Viewing 5 posts - 1 through 4 (of 4 total)

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