#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2005
    Posts
    173
    Rep Power
    10

    ASP & DSN Connections


    I'm hoping someone her maybe able to help. I've spent all day trying to get a connection through an ODBC driver to Sage Line 50 from an asp page.

    ASP and windows is not my background, that would be perl, ruby, rails and linux servers.

    I have created the odbc connection by iinstalling the driver and tested using visual studio. With visual studio i have succesfully managed to connect. However using the following asp page i am unable to connect:

    Code:
    <% Set Conn = Server.CreateObject("ADODB.Connection")
    Set rs = Server.CreateObject(ADODB.RecordSet")
    Conn.Open "Driver={Sage Line 50 v17};uid=username;dir=\\link_to\\SAGE\ACCDATA" %>
    Loading this page gives the error:

    Microsoft OLE DB Provider for ODBC Drivers error '80004005'

    Cannot find all files in data path

    /dbnetsuite/test.asp, line 3


    Can anyone suggest what i am doing wrong, am i missing a configuration step with IIS? I have spent the last 5 hours searching Google and reading the same articles again and again to find out what im missing with no success.

    Graham
    ================================================
    http://www.8bitscraps.co.uk - Tech Tips & Tools
  2. #2
  3. No Profile Picture
    Grumpier old Moderator
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jun 2003
    Posts
    14,440
    Rep Power
    4539
    I've never heard of sage line 50, but from the error message you posted I imagine you'll have to find the answer from their support. You could set up an odbc DSN on the web server and use a dsn name for your connection. It used to be possible to put an empty .udl file on your workstation and use it to help you build your connection string, you'd right-click the .udl file to get to the connection properties.

    And if your VS isn't on the web server computer the path in your connection is probably all wrong.
    ======
    Doug G
    ======
    Bartender to Rene Descartes "have another beer?" Descartes: "I think not" and he vanished.
    --Alfred Bester
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2010
    Posts
    15
    Rep Power
    0
    depending upon which database you are using, you can find help for connection strings here:

    connectionstrings .com/

IMN logo majestic logo threadwatch logo seochat tools logo