|
-
Jun 28th, 2000, 07:03 PM
#1
Thread Starter
New Member
Hi Great ASP Programmers!!
I am a new ASP cub and want your help for my first ASP site. Actually I have an Access database just to display some information based on visitor's selection. The site is working o.k. offline but gives error when I see it online. The error is 'Invalid directory path The database not present at C:\WinNT\System32\ Directory'. I think the problem is with the cn.connectstring-
Conn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.3.51;Persist Security Info=False;Data Source=thoughts.mdb"
u can see the problem at : http://www.exploredelhi.com/explore
Please Help me (& be quick)
Thanx
Deepak
-
Jun 28th, 2000, 07:37 PM
#2
Member
I don't know much about OLEDB, but I can tell you how to create the connection using ADO. First you go to control panel, and double click on ODBC. Go to System DSN and add your database (first you choose the generic Access driver, then you give it a name, and select where the database is). The name is what you'll use to create the connection.
<%
Set conn = Server.CreateObject("ADODB.Connection")
conn.open "DSN=YourFilesDSNName","",""
Set Session("YourFilesDSNName_conn") = conn
%>
Hope that helps and was fast enough.
I haven't found anywhere that tells how to do it in OLE, but I'm sure someone around here can tell you how to do that.
-
Jun 28th, 2000, 08:29 PM
#3
Frenzied Member
even easier:
Code:
dim conn
Set Conn = Server.CreateObject("ADODB.Connection")
Conn.Open("DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=C:\users.mdb")
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|