ASP linking to SQL Server using ODBC - problem

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Richard Muller

    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.Even ts 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 Win2000AdvanceS erverSP4
    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.in c"-->

    <H1>Events</H1><BR>

    <%
    Response.Write "Creating Connection object<<BR>>"
    Set Conn = Server.CreateOb ject("ADODB.Con nection")
    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("S ELECT * FROM Events ORDER BY EvDate, EvTime")
    Response.Write "Created RecordSet rsEvents by executing SELECT stmt<<BR>>"
    %>

    </BODY>

    </html>



  • Tom B

    #2
    Re: ASP linking to SQL Server using ODBC - problem

    Use an OLE DB Provider for access.
    All connection strings in one place. Find the syntax for your database connection using ADO.NET, ADO, ODBC, OLEDB, C#, VB, VB.NET, ASP.NET and more.





    "Richard Muller" <RichardLMuller DELETE@comcast. net> wrote in message
    news:O1UyUpQmDH A.2772@TK2MSFTN GP10.phx.gbl...[color=blue]
    > 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.Even ts table represented by the DSN. I updated the table[/color]
    through[color=blue]
    > the front end and confirmed success using a Select statement in Query
    > Analyzer.
    >
    > I running Win2000ProSP4 workstation networked to an[/color]
    Win2000AdvanceS erverSP4[color=blue]
    > 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.in c"-->
    >
    > <H1>Events</H1><BR>
    >
    > <%
    > Response.Write "Creating Connection object<<BR>>"
    > Set Conn = Server.CreateOb ject("ADODB.Con nection")
    > 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[/color]
    stmt<<BR>>"[color=blue]
    > Set rsEvents = Conn.Execute("S ELECT * FROM Events ORDER BY EvDate,[/color]
    EvTime")[color=blue]
    > Response.Write "Created RecordSet rsEvents by executing SELECT[/color]
    stmt<<BR>>"[color=blue]
    > %>
    >
    > </BODY>
    >
    > </html>
    >
    >
    >[/color]


    Comment

    • Richard Muller

      #3
      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@NOSPAM hotmail.com> wrote in message
      news:%23dMG$%23 QmDHA.2776@tk2m sftngp13.phx.gb l...[color=blue]
      > Use an OLE DB Provider for access.
      > http://www.connectionstrings.com
      >
      > http://www.aspfaq.com/show.asp?id=2126
      >
      >
      > "Richard Muller" <RichardLMuller DELETE@comcast. net> wrote in message
      > news:O1UyUpQmDH A.2772@TK2MSFTN GP10.phx.gbl...[color=green]
      > > 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[/color][/color]
      default[color=blue][color=green]
      > > 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.Even ts table represented by the DSN. I updated the table[/color]
      > through[color=green]
      > > the front end and confirmed success using a Select statement in Query
      > > Analyzer.
      > >
      > > I running Win2000ProSP4 workstation networked to an[/color]
      > Win2000AdvanceS erverSP4[color=green]
      > > 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.in c"-->
      > >
      > > <H1>Events</H1><BR>
      > >
      > > <%
      > > Response.Write "Creating Connection object<<BR>>"
      > > Set Conn = Server.CreateOb ject("ADODB.Con nection")
      > > 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[/color]
      > stmt<<BR>>"[color=green]
      > > Set rsEvents = Conn.Execute("S ELECT * FROM Events ORDER BY EvDate,[/color]
      > EvTime")[color=green]
      > > Response.Write "Created RecordSet rsEvents by executing SELECT[/color]
      > stmt<<BR>>"[color=green]
      > > %>
      > >
      > > </BODY>
      > >
      > > </html>
      > >
      > >
      > >[/color]
      >
      >[/color]


      Comment

      • Richard Muller

        #4
        Problem solved; Thanks!

        Tom,

        Thanks for your help. Problem solved!

        Regards,
        Richard Muller


        Comment

        Working...