Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
Classic ASP Databases Discuss using ASP 3 to work with data in databases, including ASP Database Setup issues from the old P2P forum on this specific subtopic. See also the book forum Beginning ASP.NET Databases for questions specific to that book. 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 Databases 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
Old August 13th, 2003, 05:07 PM
Registered User
Join Date: Aug 2003
Location: San Diego, CA, USA.
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Access Database Connection Problems

My company just switched to a new host and I am having a real problem connecting to an Access Database. The site administrator says that Windows 2003 no longer allows DSN-less connections, so they created a DSN to the database. I now need to use DSN syntax instead. I have tried (and tried!) a lot of different codes from other web sites but nothing works.

Here is the old code:

Set MyConn=Server.CreateObject("ADODB.Connection")
  connStr="Provider=Microsoft.Jet.OLEDB.4.0;" & _
                 "Data Source=C:\datastores\PlanetHealth.mdb"

Can someone give me a pointer on what the new code should be?


Old August 13th, 2003, 10:22 PM
Authorized User
Join Date: Jun 2003
Location: Quezon City, MM, Philippines.
Posts: 97
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to planeswalk


If you already have a DSN then you only need to call the DSN name to open a db connection:

  Set MyConn = Server.CreateObject("ADODB.Connection")
  MyConn.Open "DSN = dsn_name"


Marlon Villarama
Support Team
Web Burner Hosting
Toll-Free: 877-535-2876

Similar Threads
Thread Thread Starter Forum Replies Last Post
ADO Connection problems in Access 2003 elecdave Access VBA 4 January 22nd, 2007 10:49 AM
Database Connection Problems Roy Ng Dreamweaver (all versions) 3 August 15th, 2005 09:36 AM
access database connection problem shaileshk ADO.NET 6 July 5th, 2005 03:30 AM
Access Database connection widad Classic ASP Databases 3 November 5th, 2004 05:24 AM
Connection to a Access database aadz5 ASP.NET 1.0 and 1.1 Basics 2 October 13th, 2003 06:35 AM

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