Computer Learning Zone CLZ Access Excel Word Windows

Fool me once, shame on you. Fool me twice, prepare to die.

-Klingon Proverb
 
Home   Courses   TechHelp   Forums   Help   Contact   Merch   Join   Order   Logon  
 
Back to Active Server Pages 301    Comments List
Upload Images   @Reply   Bookmark    Link   Email   Next Unseen 

Gary Gomer 

18 years ago
Richard

I am trying to use the DSN database connection in ASP301 and I couldn't get it working. Here is my code:

<%
DSN = "ASP300" ' Name of the ODBC Connection

Set Conn = Server.CreateObject ("ADODB.Connection") ' Creates a connection to the database ADODB (Active X Data Objects B)
Conn.ConnectionString="DSN=" & DSN
Conn.Open

Set RS = Server.CreateObject("ADODB.Recordset") ' Tell it what recordsets / Queries to look at

RS.Open "CustomerT", Conn  'Tell it What Database to open (CustomerT) and what connection to use to Open It(Conn)

Response.write RS("FirstName") ' Will write the first name on the first record

RS.Close
Set RS = Nothing
Conn.Close
Set Conn = Nothing


%>

Here is the error I am getting:

Microsoft OLE DB Provider for ODBC Drivers error '80004005'

[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified

/ASP301/DSNDefault.asp, line 7

Line 7 is : Conn.Open

Any idea what is wrong?

Gary

This thread is now CLOSED. If you wish to comment, start a NEW discussion in Active Server Pages 301.
 

Next Unseen

 
New Feature: Comment Live View
 
 

The following is a paid advertisement
Computer Learning Zone is not responsible for any content shown or offers made by these ads.
 

Learn
 
Access - index
Excel - index
Word - index
Windows - index
PowerPoint - index
Photoshop - index
Visual Basic - index
ASP - index
Seminars
More...
Customers
 
Login
My Account
My Courses
Lost Password
Memberships
Student Databases
Change Email
Info
 
Latest News
New Releases
User Forums
Topic Glossary
Tips & Tricks
Search The Site
Code Vault
Collapse Menus
Help
 
Customer Support
Web Site Tour
FAQs
TechHelp
Consulting Services
About
 
Background
Testimonials
Jobs
Affiliate Program
Richard Rost
Free Lessons
Mailing List
PCResale.NET
Order
 
Video Tutorials
Handbooks
Memberships
Learning Connection
Idiot's Guide to Excel
Volume Discounts
Payment Info
Shipping
Terms of Sale
Contact
 
Contact Info
Support Policy
Mailing Address
Phone Number
Fax Number
Course Survey
Email Richard
[email protected]
Blog RSS Feed    YouTube Channel

LinkedIn
Copyright 2026 by Computer Learning Zone, Amicron, and Richard Rost. All Rights Reserved. Current Time: 5/16/2026 12:51:37 PM. PLT: 0s