SQL Server 2000 Connection problems - please help


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 3 of 3

Thread: SQL Server 2000 Connection problems - please help

  1. #1
    Wesley Long Guest

    SQL Server 2000 Connection problems - please help

    OK, I'm stumped:

    I have a client with an SQL 2000 server hosting a database I created for one
    of my applications.

    The one thing that's odd is this server is not part of the domain, but is
    "pingable" from the client computers

    When I connect to the database using an ADO connection:

    Dim Db as new ADODB.Connection
    db.open "driver={SQL Server};server=co_melena;database=MyDatabase",
    "MyUsername", "MyPassword"

    It will not connect. It claims it cannot find the server, even if I use the
    SQL System Administrator login

    However, there is a share on this server: \\co_melena\stuff, that I can
    open, log into, and close.

    After I do this, then running the same code (above) works. Even though the
    username and password are completely different for accessing the share, it
    somehow "turns something on" that allows me to connect, at least until I
    reboot. Now all my privilege levels with the different usernames and
    passwords work correctly.

    Now, there is another application running with a database on this server
    that seems to work fine, and I cannot seem to find a COM or DCOM component
    on the server.

    So my question is this: Is there a security or role that I have not set?
    Is it due to the SQL server not being part of their domain? I would really
    appreciate any wisdom you fine folk would share with me.




  2. #2
    Wesley Long Guest

    Re: SQL Server 2000 Connection problems - please help

    OK, I have made some headway:

    I found that I cannot create an ODBC connection to this server in the
    control panels from any of the clients if I use the "named pipes" connection
    option, but if I use TCP/IP, it works. Again, if I establish the connection
    to the shared folder first, then the named pipes option works.

    I really can't re-configure their server to fix this problem, but does
    anyone know how to force your connection to the database server to use
    TCP/IP instead of named pipes without having the ODBC connection defined?

    PLEASE HELP!
    "Wesley Long" <weslong@wesware.com> wrote in message
    news:3b7b6bb9@news.devx.com...
    > OK, I'm stumped:
    >
    > I have a client with an SQL 2000 server hosting a database I created for

    one
    > of my applications.
    >
    > The one thing that's odd is this server is not part of the domain, but is
    > "pingable" from the client computers
    >
    > When I connect to the database using an ADO connection:
    >
    > Dim Db as new ADODB.Connection
    > db.open "driver={SQL Server};server=co_melena;database=MyDatabase",
    > "MyUsername", "MyPassword"
    >
    > It will not connect. It claims it cannot find the server, even if I use

    the
    > SQL System Administrator login
    >
    > However, there is a share on this server: \\co_melena\stuff, that I can
    > open, log into, and close.
    >
    > After I do this, then running the same code (above) works. Even though

    the
    > username and password are completely different for accessing the share, it
    > somehow "turns something on" that allows me to connect, at least until I
    > reboot. Now all my privilege levels with the different usernames and
    > passwords work correctly.
    >
    > Now, there is another application running with a database on this server
    > that seems to work fine, and I cannot seem to find a COM or DCOM component
    > on the server.
    >
    > So my question is this: Is there a security or role that I have not set?
    > Is it due to the SQL server not being part of their domain? I would

    really
    > appreciate any wisdom you fine folk would share with me.
    >
    >
    >




  3. #3
    Paul Mc Guest

    Re: SQL Server 2000 Connection problems - please help


    G'day Wesley.

    >I really can't re-configure their server to fix this problem, but does
    >anyone know how to force your connection to the database server to use
    >TCP/IP instead of named pipes without having the ODBC connection defined?


    Yep - easily done. Add this into your connection string:

    Network Library=dbmssocn


    Here is a link explaining it:
    http://support.microsoft.com/support.../Q238/9/49.ASP

    Cheers,
    Paul


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center