DSN-less Connection to MS-Access 2000 Using Classic ASP

Discussion in 'Databases' started by adsc, Mar 3, 2007.

Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.
  1. We just moved our site to discountasp.net, & trying to change the site database connection to what the site requires but it's not working

    We are using DSNless connection, we changed our code as follow:
    [[start]]
    Set myConn = Server.CreateObject("ADODB.Connection")
    myConnStr = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & Server.MapPath("..\_database\ticker.mdb")
    myConn.ConnectionString = myConnStr
    myConn.Open
    [[end]]

    But still not getting the data, I think we have something wrong in the database path syntax, could you please help us, also the main page home.asp showing another error "script time out...", I am not sure if this also related to the database.

    Please advice
    Thnaks for the help
    Ahmad.
     
  2. Bruce

    Bruce DiscountASP.NET Staff

    where is your database located?

    If it is in the _database directory under the root, try the following connection string.

    myConnStr = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & Server.MapPath("\_database\ticker.mdb")

    What error are you getting? You should get an error very quickly if the path is wrong.

    Bruce

    DiscountASP.NET
    www.DiscountASP.NET
     
  3. Hi Bruce,

    Many thnaks to you, the fany think is I tried many thinks except this one "\_"

    Thanks again,
    Ahmad.
     
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