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 Databases
Password Reminder
| FAQ | Members List | Calendar | 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 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
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old February 24th, 2005, 07:59 AM
Registered User
Join Date: Feb 2005
Location: , , .
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default Connection string and file include trouble

I am having a problem with including files into some ASP pages. Even when the file is in the same directory as the .asp page, it gives me a missing file error.

Server is IIS 5.1 with Scripts enabled.

Example include code that isn't working:
<!--METADATA TYPE="typelib"
             FILE="msado15.dll" -->


I believe another problem I am having has to do with the same problem. I am getting an error on trying to connect with a database (Access 2000). It is secured with user level security and currently the db file and the extra security file are both in the same folder.

here is the code from the file 'dbConnect.asp'
Dim objConn
Set objConn = Server.CreateObject("ADODB.Connection")

' Get username and password
if (Session("sUsername") = "") or (Session("sPassword") = "") then
    response.Redirect "Default.asp"

objConn.Open "Provider = Microsoft.Jet.OLEDB.4.0; Data Source = G3TrainingDB_2005.mdb", Session("sUsername"), Session("sPassowrd")

Any advice on this would be greatly appreciated.

John Cramer
Reply With Quote
  #2 (permalink)  
Old February 24th, 2005, 08:36 AM
Friend of Wrox
Join Date: Jun 2003
Location: Harrisburg, PA, USA.
Posts: 1,998
Thanks: 0
Thanked 3 Times in 3 Posts

For the datasource, you have to specify the full path to the .mdb file. For the include file, is this file in the same directory as that file? You could try include virtual="~/path/dbconnect.asp", if your app is setup as a virtual.

Reply With Quote
  #3 (permalink)  
Old February 26th, 2005, 04:46 AM
Registered User
Join Date: Feb 2005
Location: , , .
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts

Thank you for the help! Using the full physical path helped conecting to the database and also the METADATA include. It still didn't seem to find the file when I used the virtual path, but maybe there is something configured different on my web server.

I am still having trouble with the '#include' line, but I have a couple workarounds I'm going to try with that. All I want that for is to write write snippets that will be used on several pages.

A web site that helped me with my last problem of connecting to a db with userlevel security was www.connectionstrings.com
They have example connection strings for a ton of databases and for each one it has most if not all of the possible different configuarations. A VERY handy website.

John Cramer
Reply With Quote

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
Connection String with Excel file mateenmohd Classic ASP Databases 8 January 25th, 2013 02:49 AM
Access Connection String Trouble mat41 Classic ASP Basics 12 June 29th, 2008 07:53 PM
Include file trouble rstelma ASP.NET 1.0 and 1.1 Professional 3 February 12th, 2008 01:21 PM
setup database connection include file in PHP crmpicco PHP Databases 2 September 30th, 2007 04:18 PM
difference between include file & include virtual crmpicco Classic ASP Basics 2 January 23rd, 2006 11:50 AM

All times are GMT -4. The time now is 04:26 PM.

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