ASP linking to SQL Server using ODBC - problem

Ask a Question related to ASP, Design and Development.

  1. #1

    Default ASP linking to SQL Server using ODBC - problem

    Hi All,

    I've got the ASP script shown below that complains as follows:

    Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
    [Microsoft][ODBC Driver Manager] Data source name not found and no default
    driver specified
    /ShowEvents.asp, line 24

    Line 24 of the script is the line:

    Conn.Open "EventsDB","sa","" 'EventsDB is the ODBC System DSN

    I used the 'EventsDB DSN to link an Access 2000 "front end" to the
    tempdb.dbo.Events table represented by the DSN. I updated the table through
    the front end and confirmed success using a Select statement in Query
    Analyzer.

    I running Win2000ProSP4 workstation networked to an Win2000AdvanceServerSP4
    running Sequel Server 2000. Microsoft Update patches are up-to-date.

    Any suggestions would be appreciated.
    --
    Regards,
    Richard

    640K ought to be enough for anybody.
    Bill Gates, 1981

    =========== ShowEvents.asp =============
    <html>
    <!-- ShowEvents.asp
    Display rows in "Events" table in
    "tempdb" database in
    SQL Server 2000 on
    "ASCI2000AS" Win2000 Advanced Server
    using System DSN "EventsDB"
    -->
    <head>
    <title>Events</title>
    </head>

    <BODY BGCOLOR=#ffffff>
    <!--#include file="adovbs.inc"-->

    <H1>Events</H1><BR>

    <%
    Response.Write "Creating Connection object<<BR>>"
    Set Conn = Server.CreateObject("ADODB.Connection")
    Response.Write "Created Connection object<<BR>>"

    Response.Write "Opening EventsDB connection<<BR>>"
    Conn.Open "EventsDB","sa","" 'EventsDB is the ODBC System DSN
    Response.Write "Opened EventsDB connection<<BR>>"

    Response.Write "Creating RecordSet rsEvents by executing SELECT stmt<<BR>>"
    Set rsEvents = Conn.Execute("SELECT * FROM Events ORDER BY EvDate, EvTime")
    Response.Write "Created RecordSet rsEvents by executing SELECT stmt<<BR>>"
    %>

    </BODY>

    </html>



    Richard Muller Guest

  2. Similar Questions and Discussions

    1. Linking to SQL Server 2000
      I have been using CF for a number of years but always with Access. Not having SQL Server 2000 experience is holding me back. Can anyone give me or...
    2. DataDirect SequeLink Server for ODBC Socket hasencountered a problem and needs to cl
      When I boot up my PC I am getting an error saying "DataDirect SequeLink Server for ODBC Socket has encountered a problem and needs to close." I am...
    3. [Microsoft][ODBC SQL Server Driver][SQL Server]Invalid object name
      Hi, I am able to retrieve data from database and then the object name is fine, say SELECT * FROM problemdb, but when I try to use INSERT, I get...
    4. linking via SSH to another server.
      It appears that I need to use exec() to execute the ssh command to, in turn, execute a command on a distant machine. Are there better ways to do...
    5. Linking Informix tables to SQL Server 2000
      I am having difficulty creating a linked server (Informix) in Microsoft SQL Server 2000. I have successfully installed the Informix OLEDB driver;...
  3. #2

    Default Re: ASP linking to SQL Server using ODBC - problem

    Use an OLE DB Provider for access.
    [url]http://www.connectionstrings.com[/url]

    [url]http://www.aspfaq.com/show.asp?id=2126[/url]


    "Richard Muller" <RichardLMullerDELETE@comcast.net> wrote in message
    news:O1UyUpQmDHA.2772@TK2MSFTNGP10.phx.gbl...
    > Hi All,
    >
    > I've got the ASP script shown below that complains as follows:
    >
    > Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
    > [Microsoft][ODBC Driver Manager] Data source name not found and no default
    > driver specified
    > /ShowEvents.asp, line 24
    >
    > Line 24 of the script is the line:
    >
    > Conn.Open "EventsDB","sa","" 'EventsDB is the ODBC System DSN
    >
    > I used the 'EventsDB DSN to link an Access 2000 "front end" to the
    > tempdb.dbo.Events table represented by the DSN. I updated the table
    through
    > the front end and confirmed success using a Select statement in Query
    > Analyzer.
    >
    > I running Win2000ProSP4 workstation networked to an
    Win2000AdvanceServerSP4
    > running Sequel Server 2000. Microsoft Update patches are up-to-date.
    >
    > Any suggestions would be appreciated.
    > --
    > Regards,
    > Richard
    >
    > 640K ought to be enough for anybody.
    > Bill Gates, 1981
    >
    > =========== ShowEvents.asp =============
    > <html>
    > <!-- ShowEvents.asp
    > Display rows in "Events" table in
    > "tempdb" database in
    > SQL Server 2000 on
    > "ASCI2000AS" Win2000 Advanced Server
    > using System DSN "EventsDB"
    > -->
    > <head>
    > <title>Events</title>
    > </head>
    >
    > <BODY BGCOLOR=#ffffff>
    > <!--#include file="adovbs.inc"-->
    >
    > <H1>Events</H1><BR>
    >
    > <%
    > Response.Write "Creating Connection object<<BR>>"
    > Set Conn = Server.CreateObject("ADODB.Connection")
    > Response.Write "Created Connection object<<BR>>"
    >
    > Response.Write "Opening EventsDB connection<<BR>>"
    > Conn.Open "EventsDB","sa","" 'EventsDB is the ODBC System DSN
    > Response.Write "Opened EventsDB connection<<BR>>"
    >
    > Response.Write "Creating RecordSet rsEvents by executing SELECT
    stmt<<BR>>"
    > Set rsEvents = Conn.Execute("SELECT * FROM Events ORDER BY EvDate,
    EvTime")
    > Response.Write "Created RecordSet rsEvents by executing SELECT
    stmt<<BR>>"
    > %>
    >
    > </BODY>
    >
    > </html>
    >
    >
    >

    Tom B Guest

  4. #3

    Default Re: ASP linking to SQL Server using ODBC - problem

    Hi Tom,

    Thanks for your response. I looked at your first reference and didn't
    really understand some of the parameter values. I didn't check out the
    second reference right away. Instead, I checked my installation and
    discovered I was running SQK Svr 7, so I decided to upgrade to SQL Svr 2000
    over it. That broke, so I've got to repair that problem.

    As I said, my installation of SQL Svr 2000 over SS7 failed. I suspect the
    cause is all the security and other (?) updates I've done over the past
    couple of years. I should probably have done this update a couple of years
    ago, or have done it as named installation rather than a replacement. The
    uninstall failed, so I've got my work cut out for me.

    I took a break and read your second reference. That makes sense to me! Too
    bad I didn't check that out before I broke my system. I think I'll be
    rebuilding the OS and DB software from scratch this weekend. Then I'll take
    another crack at my problem.

    Regards,
    Richard

    "Tom B" <shuckle@NOSPAMhotmail.com> wrote in message
    news:%23dMG$%23QmDHA.2776@tk2msftngp13.phx.gbl...
    > Use an OLE DB Provider for access.
    > [url]http://www.connectionstrings.com[/url]
    >
    > [url]http://www.aspfaq.com/show.asp?id=2126[/url]
    >
    >
    > "Richard Muller" <RichardLMullerDELETE@comcast.net> wrote in message
    > news:O1UyUpQmDHA.2772@TK2MSFTNGP10.phx.gbl...
    > > Hi All,
    > >
    > > I've got the ASP script shown below that complains as follows:
    > >
    > > Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
    > > [Microsoft][ODBC Driver Manager] Data source name not found and no
    default
    > > driver specified
    > > /ShowEvents.asp, line 24
    > >
    > > Line 24 of the script is the line:
    > >
    > > Conn.Open "EventsDB","sa","" 'EventsDB is the ODBC System DSN
    > >
    > > I used the 'EventsDB DSN to link an Access 2000 "front end" to the
    > > tempdb.dbo.Events table represented by the DSN. I updated the table
    > through
    > > the front end and confirmed success using a Select statement in Query
    > > Analyzer.
    > >
    > > I running Win2000ProSP4 workstation networked to an
    > Win2000AdvanceServerSP4
    > > running Sequel Server 2000. Microsoft Update patches are up-to-date.
    > >
    > > Any suggestions would be appreciated.
    > > --
    > > Regards,
    > > Richard
    > >
    > > 640K ought to be enough for anybody.
    > > Bill Gates, 1981
    > >
    > > =========== ShowEvents.asp =============
    > > <html>
    > > <!-- ShowEvents.asp
    > > Display rows in "Events" table in
    > > "tempdb" database in
    > > SQL Server 2000 on
    > > "ASCI2000AS" Win2000 Advanced Server
    > > using System DSN "EventsDB"
    > > -->
    > > <head>
    > > <title>Events</title>
    > > </head>
    > >
    > > <BODY BGCOLOR=#ffffff>
    > > <!--#include file="adovbs.inc"-->
    > >
    > > <H1>Events</H1><BR>
    > >
    > > <%
    > > Response.Write "Creating Connection object<<BR>>"
    > > Set Conn = Server.CreateObject("ADODB.Connection")
    > > Response.Write "Created Connection object<<BR>>"
    > >
    > > Response.Write "Opening EventsDB connection<<BR>>"
    > > Conn.Open "EventsDB","sa","" 'EventsDB is the ODBC System DSN
    > > Response.Write "Opened EventsDB connection<<BR>>"
    > >
    > > Response.Write "Creating RecordSet rsEvents by executing SELECT
    > stmt<<BR>>"
    > > Set rsEvents = Conn.Execute("SELECT * FROM Events ORDER BY EvDate,
    > EvTime")
    > > Response.Write "Created RecordSet rsEvents by executing SELECT
    > stmt<<BR>>"
    > > %>
    > >
    > > </BODY>
    > >
    > > </html>
    > >
    > >
    > >
    >
    >

    Richard Muller Guest

  5. #4

    Default Problem solved; Thanks!

    Tom,

    Thanks for your help. Problem solved!

    Regards,
    Richard Muller


    Richard Muller Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139