469,934 Members | 1,847 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,934 developers. It's quick & easy.

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>

Jul 19 '05 #1
3 3713
Use an OLE DB Provider for access.
http://www.connectionstrings.com

http://www.aspfaq.com/show.asp?id=2126
"Richard Muller" <Ri******************@comcast.net> wrote in message
news:O1**************@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>

Jul 19 '05 #2
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" <sh*****@NOSPAMhotmail.com> wrote in message
news:%2******************@tk2msftngp13.phx.gbl...
Use an OLE DB Provider for access.
http://www.connectionstrings.com

http://www.aspfaq.com/show.asp?id=2126
"Richard Muller" <Ri******************@comcast.net> wrote in message
news:O1**************@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>


Jul 19 '05 #3
Tom,

Thanks for your help. Problem solved!

Regards,
Richard Muller
Jul 19 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by John South | last post: by
14 posts views Thread by diskoduro | last post: by
2 posts views Thread by Simon Bitchenor | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.