Access - oleDB connection

Discussion in 'Classic ASP' started by Splash, Apr 24, 2010.

Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.
  1. Hi
    I am trying to use oledb and connect to my access db.. It works fine on my local machine, as my database location can be hard coded..

    Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\mydatabase.mdb;

    Where as on discountasp.net site
    my database is under root folder in

    Root
    _Datadase
    myDatabase.mdb

    In that case how do I specify it?

    <a:connectionstring>
    Provider=Microsoft.Jet.OLEDB.4.0;Data Source=_database\mydatabase.mdb
    </a:connectionstring>

    doesn't work.

    I also tried
    Data Source= server.map(mydatabase.mdb)


    Thanks
    Splash
     
  2. Hi,
    This is the way I used to create a conn in classic ASP for the _database folders here:

    strConn = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("/_database/mydatabase.mdb")
    Set objConn = Server.CreateObject("ADODB.Connection")
    objConn.open strConn
     
Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.

Share This Page