Wrox Programmer Forums
| 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 software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #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"
  #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

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

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".


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

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.