Print Page | Close Window

problem with connecting to database

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Database Discussion
Forum Description: Discussion and chat on database related topics.
URL: https://forums.webwiz.net/forum_posts.asp?TID=12474
Printed Date: 30 March 2026 at 3:54am
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: problem with connecting to database
Posted By: breemo
Subject: problem with connecting to database
Date Posted: 08 November 2004 at 2:57am

I have the following connection string (cn.asp) [this string is inside admin folder
---------------------------------------
<%
 ' Connection Strings
 dim Conn
 ' Add full path of database with filename here
 cnProvider = "Provider=Microsoft.JET.OLEDB.4.0;"
 cnDataSource = "Data Source =../database/Prices.mdb"
 Conn = cnProvider & cnDataSource

%>
------------------------------------
the problem is when i did upload the file on the web server the connection to the database is not working, maybe the path is wrong??!!!

i have the following folders:
- admin (folder) (which the connection string cn.asp is inside)
- database (folder) (Prices.mdb is insided)
- default.asp      with <!--#Include file="admin/cn.asp"-->
- search.asp      with <!--#Include file="admin/cn.asp"-->

Please help me

Regards,

 

Breemo




Replies:
Posted By: michael
Date Posted: 08 November 2004 at 9:23am
use MapPath on your cnDataSource or give it a physical path

-------------
http://baumannphoto.com" rel="nofollow - Blog | http://mpgtracker.com" rel="nofollow - MPG Tracker



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net