ASP linking to SQL Server using ODBC - problem

R

Richard Muller

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>
 
T

Tom B

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

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


Richard Muller said:
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
 
R

Richard Muller

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 said:
Use an OLE DB Provider for access.
http://www.connectionstrings.com

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


Richard Muller said:
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 said:
Set rsEvents = Conn.Execute("SELECT * FROM Events ORDER BY EvDate, EvTime")
Response.Write "Created RecordSet rsEvents by executing SELECT
stmt said:
%>

</BODY>

</html>
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,014
Latest member
BiancaFix3

Latest Threads

Top