Results 1 to 3 of 3

Thread: .MDB Path in Asp

  1. #1

    Thread Starter
    New Member
    Join Date
    Nov 1999
    Posts
    4

    Question

    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

  2. #2
    Member
    Join Date
    Jun 2000
    Posts
    45
    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.

  3. #3
    Frenzied Member Mark Sreeves's Avatar
    Join Date
    Nov 1999
    Location
    UK
    Posts
    1,845
    even easier:

    Code:
    dim conn
    
    Set Conn = Server.CreateObject("ADODB.Connection")
    
    Conn.Open("DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=C:\users.mdb")
    Mark
    -------------------

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width