ADO Connection to SQL 2000 problems

  • My web application connects to a SQL 2000 database via an ADO wrapper.  If I run the app from the scripts directory of my own pc the connection to the database on a remote server is successful , but when I run the app on the same server as the database I get connection errors (most commonly "Server does not exist or access is denied").  The connection string of the ADO wrapper (component) contains the user name and password of the database and can be set to connect to the database from my pc.  Can anyone suggest possible causes of this behaviour?

    Thanks for any advice

    Steve

  • I had same sort of problems once, and it turned out that we had to play with the way our client was connecting to the server, i.e. multiprotocol/named-pipes/TCPIP.

     

    Try specifying different ways of connecting from the connStr, like so:

    1. Using the SQL Client Network Utility, create a named alias for your SQLServer. In doing this, you can specify how the alias should connect to the server (i.e. TCPIP/named pipes/multiprotocol etc.). I usually use multiprotocol or TCPIP.

    2. Make sure to use your named alias from the ADO connection string, like so:

    Provider=SQLOLEDB.1;Password=[your SQL password];Persist Security Info=True;User ID=[your SQL login];Initial Catalog=[Your DB name];Data Source=[Your named alias]

     

    Good luck,

    - Avi

     

  • Thanks for the reply, Avi.

    I don't have access to the remote server so I'm having to wait for someone else to tryh what you have suggested.  I'll let you know the outcome when that happens.

     

    Best wishes

    Steve

  • Also if the database is local to that server you may want to have them add an alias to that server that matches the one you are using in CLient Network Utility. If you cannot get that then change to localhost or 127.0.0.1 when you push to server which will give you the local machine without regard for a specific alias.

  • Forgive my ignorance/inexperience here, but I'm not quite sure I understand.May I ask for clarification? 

    Having added the server alias of the remote server in the Client Network Utility on the remote server, what should my next move be?  Is 127.0.0.1 = Local Host?

    Thanks for your help

    Steve

  • Avi and Antares686

     

    Just heard from my colleague at the remote server that it's all working fine now.  Putting the server alias in there did the trick.  Thanks a lot for your help, it's much appreciated.

     

    sincerely

    Steve

  • Yes, 127.0.0.1 is the loopback address and effectively is the same as Local Host. Then you should be fine. Is it the same error still.

  • Glad to have helped.

     - Avi

Viewing 8 posts - 1 through 7 (of 7 total)

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