Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP 3 Classic ASP Active Server Pages 3.0 > Classic ASP Professional
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Classic ASP Professional For advanced coder questions in ASP 3. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Professional section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old January 23rd, 2004, 10:51 AM
Authorized User
 
Join Date: Jan 2004
Location: Frederick, MD, USA.
Posts: 43
Thanks: 0
Thanked 0 Times in 0 Posts
Default Error: Data source name not found and no default d

Hi. I am trying to troubleshoot someone else's code. I am getting the following error when the page tries to open the connection. Any ideas?

Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified

Dim Conn
Dim connectstring

   Dim sRTF, sFileName, sConn

   'Create the file for the RTF
   Dim fso, MyFile
   Set fso = CreateObject("Scripting.FileSystemObject")
   datestamp = Month(Date) & Day(Date) & Year(Date) & "_" & Hour(Time()) & Minute(Time()) & Second(Time())
   sFileName = Server.MapPath("path_" & datestamp & ".rtf")
   Set MyFile = fso.CreateTextFile(sFileName, True)

   Cycle = request("Cycle")
   Dim rs
   connectstring = "test"
   Set Conn = CreateObject("ADODB.Connection")
   'Conn.Provider = "Microsoft.Jet.OLEDB.4.0"
   Conn.Mode = 3 'adModeRead=1
   Conn.Open connectstring, "username", "password"
Reply With Quote
  #2 (permalink)  
Old January 23rd, 2004, 11:34 AM
Friend of Wrox
 
Join Date: Jun 2003
Location: , , United Kingdom.
Posts: 1,212
Thanks: 0
Thanked 1 Time in 1 Post
Default

connectstring variable should be something like
"Provider=Microsoft.Jet.OLEDB.4.0;" & _
           "Data Source=c:\somepath\myDb.mdb;" & _
           "User Id=admin;" & _
           "Password="

you have just given it the value "test" which is meaningless. If you have a DSN set-up called test then you can change it to "DSN=test".

hth
Phil
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Data source name not found and no default driver s Durkee VB.NET 2002/2003 Basics 0 September 21st, 2007 01:11 PM
complile error : method or data member not found! Tasha Access VBA 6 May 1st, 2007 03:49 PM
Compile Error data member not found alfiee Access VBA 1 July 7th, 2006 05:35 PM
err 2580 - data source not found DavidCC SQL Server 2000 4 April 1st, 2004 03:19 PM
Data source name not found and no default driver s bjtindle Classic ASP Databases 5 September 10th, 2003 04:35 AM



All times are GMT -4. The time now is 05:29 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.