Results 1 to 10 of 10
  1. #1
    Join Date
    Jul 2004
    Posts
    45

    Unanswered: Connection String for Remote Server

    I've worked a lot with IIS and SQL server on the same server, but i'm not faced with running my asp scripts on a separate, remote server.

    I am the admin for the database server, running SQL 2008 express, but I am not the admin for the IIS server.

    What should my connection string look like to make the remote connection to the database??

  2. #2
    Join Date
    May 2004
    Location
    Seattle
    Posts
    1,313

  3. #3
    Join Date
    Jul 2004
    Posts
    45
    When using as indicated from connectionstring.com:

    Provider=SQLNCLI10;Server=sql.domain.com;Database= jesse;Uid=jesse; Pwd=jessespw;

    I get:
    "Provider cannot be found. It may not be properly installed."

  4. #4
    Join Date
    May 2004
    Location
    Seattle
    Posts
    1,313
    that's for OLEDB provider, which you don't have installed. What technology are you using to connect? is this a .net app? if so you are probably using SqlClient. If that's the case you want something like this:

    Data Source=myServerAddress;Initial Catalog=myDataBase;User Id=myUsername;Password=myPassword;

    also is your name Jesse? mine too!

  5. #5
    Join Date
    Jul 2004
    Posts
    45
    When I try the string above, I get

    [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified

    This is a classic asp script.

    and Yes, my name is Jesse haha

  6. #6
    Join Date
    May 2004
    Location
    Seattle
    Posts
    1,313
    well, you need to figure out what library you are using to connect to SQL. SqlClient, OLEDB, ODBC, or what?

  7. #7
    Join Date
    Jul 2004
    Posts
    45
    Can you just clarify that for me...I've always used conn strings that looked like

    Driver={SQL Server};Server=... These were also on the same sever as the database.

    When I upgraded to SQL 2008 express, I had to change the strings to:

    Provider=SQLNCLI10;Server=...

    Now I'm trying to connect from a remote server (totally different networks) and I'm struggling with this. As I've said, I'm not an admin of the web server. Are there a couple different things I could try?

  8. #8
    Join Date
    Jul 2004
    Posts
    45
    As an update, I've been trying a couple things and seem to have gotten around the driver issue.

    I'm now using:

    Provider=SQLOLEDB.1;Data Source=209.xx.xx.xxx\SQLEXPRESS;Initial Catalog=jesse;Uid=jesse;Pwd=jessespw;

    This, however, gives me the error:
    [DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied.

  9. #9
    Join Date
    Jul 2004
    Posts
    45
    Trial and error paid off, I guess...got it to work using:

    Driver={SQL Server};Server=209.xx.xx.xxx,1433\SQLEXPRESS;Datab ase=jplace;Uid=jesse;Pwd=jessespw;

  10. #10
    Join Date
    May 2004
    Location
    Seattle
    Posts
    1,313
    that is an ODBC connstr.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •