Data source name not found

Discussion in 'HTML' started by Otuatail, Dec 5, 2003.

  1. Otuatail

    Otuatail Guest

    Can anyone help me with this database connection and an asp web page.
    I am using Windows XP Professional with IIS added, Office 2000 and Visual
    Studio 6 and using Internet Developer.
    I have created a simple Access database and used ODBC in control pane. All I
    have done is select a USER DSN and MS Access Database, and browsed to locate
    it. No password has been created. I get the following error on line 6 which is
    the "connection.Open dsn" line

    ----------------------------------
    HTTP 500.100 - Internal Server Error - ASP error
    Internet Information Services

    Technical Information (for support personnel)
    · Error Type:
    Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
    [Microsoft][ODBC Driver Manager] Data source name not found and no default
    driver specified
    /default.asp, line 6
    · Browser Type:
    Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)
    · Page:
    GET /default.asp

    ----------- Here is the Short Code -----------------
    <%@ Language=VBScript %>
    <%
    dsn = "SampleDB"
    Set connection = Server.CreateObject("ADODB.Connection")
    Set rsResults = Server.CreateObject("ADODB.Recordset")
    connection.Open dsn

    sqlResults = "SELECT * FROM Tables"
    rsResults.Open sqlResults, connection, 1, 3
    %>
    <HTML>
    <BODY>
    <FORM>

    <%if rsResults.eof = false then
    while rsResults.eof = false%>

    <%=rsResults("Name")%>
    <br>
    <%rsResults.MoveNext
    wend
    end if%>

    </FORM>
    </BODY>
    </HTML>

    --------------------------------
    Can anyone help this must be a simple error
    TIA

    Paul.
    Otuatail, Dec 5, 2003
    #1
    1. Advertising

  2. Otuatail wrote:
    > Can anyone help me with this database connection and an asp web page.
    > I am using Windows XP Professional with IIS added, Office 2000 and
    > Visual Studio 6 and using Internet Developer.
    > I have created a simple Access database and used ODBC in control
    > pane. All I have done is select a USER DSN and MS Access Database,
    > and browsed to locate it. No password has been created. I get the
    > following error on line 6 which is the "connection.Open dsn" line
    >
    > ----------------------------------
    > HTTP 500.100 - Internal Server Error - ASP error
    > Internet Information Services
    >
    > Technical Information (for support personnel)
    > · Error Type:
    > Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
    > [Microsoft][ODBC Driver Manager] Data source name not found and no
    > default driver specified
    > /default.asp, line 6
    > ...
    > Can anyone help this must be a simple error


    Use ADO and dsnless connections instead of ODBC/DSNs
    Ensure you have the correct path to the mdb.

    --
    William Tasso - http://WilliamTasso.com
    William Tasso, Dec 6, 2003
    #2
    1. Advertising

  3. Otuatail

    Guest Guest

    "Otuatail" <> wrote in message
    news:...
    > Can anyone help me with this database connection and an asp web page.
    > I am using Windows XP Professional with IIS added, Office 2000 and Visual
    > Studio 6 and using Internet Developer.
    > I have created a simple Access database and used ODBC in control pane. All

    I
    > have done is select a USER DSN and MS Access Database, and browsed to

    locate
    > it. No password has been created. I get the following error on line 6

    which is
    > the "connection.Open dsn" line
    >
    > ----------------------------------
    > HTTP 500.100 - Internal Server Error - ASP error
    > Internet Information Services
    >
    > Technical Information (for support personnel)
    > · Error Type:
    > Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
    > [Microsoft][ODBC Driver Manager] Data source name not found and no default
    > driver specified
    > /default.asp, line 6
    > · Browser Type:
    > Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)
    > · Page:
    > GET /default.asp
    >
    > ----------- Here is the Short Code -----------------
    > <%@ Language=VBScript %>
    > <%
    > dsn = "SampleDB"
    > Set connection = Server.CreateObject("ADODB.Connection")
    > Set rsResults = Server.CreateObject("ADODB.Recordset")
    > connection.Open dsn
    >
    > sqlResults = "SELECT * FROM Tables"
    > rsResults.Open sqlResults, connection, 1, 3
    > %>
    > <HTML>
    > <BODY>
    > <FORM>
    >
    > <%if rsResults.eof = false then
    > while rsResults.eof = false%>
    >
    > <%=rsResults("Name")%>
    > <br>
    > <%rsResults.MoveNext
    > wend
    > end if%>
    >
    > </FORM>
    > </BODY>
    > </HTML>
    >
    > --------------------------------
    > Can anyone help this must be a simple error
    > TIA
    >
    > Paul.
    >


    I haven't played around with the Microsoft web servers in a long time, but
    it seems like I used to use the System DSNs
    Guest, Dec 8, 2003
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. George Ter-Saakov
    Replies:
    0
    Views:
    458
    George Ter-Saakov
    Jun 26, 2003
  2. Nick Poulis
    Replies:
    0
    Views:
    586
    Nick Poulis
    May 28, 2005
  3. Michael J. Moore

    ODBC to Oracle (data source name not found)

    Michael J. Moore, Jul 21, 2003, in forum: Python
    Replies:
    0
    Views:
    1,293
    Michael J. Moore
    Jul 21, 2003
  4. Bob Gailer
    Replies:
    0
    Views:
    484
    Bob Gailer
    Jul 21, 2003
  5. Victoria Chin
    Replies:
    1
    Views:
    263
    Ray at
    Sep 17, 2003
Loading...

Share This Page