Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
Classic ASP Components Discussions specific to components in ASP 3.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Components section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old July 20th, 2004, 01:23 AM
Authorized User
Join Date: Jul 2004
Location: , , .
Posts: 23
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to vinodkalpaka Send a message via Yahoo to vinodkalpaka
Default Microsoft Access can't open the database because.

hi all,

I have a problem with devoloping an asp program , that shouldl open ms-access using

Set objAccess = Server.CreateObject("Access.Application")

here is my asp code.

    Dim objAccess
    Set objAccess = Server.CreateObject("Access.Application")
        objAccess.OpenCurrentDatabase request("APPL_PHYSICAL_PATH") & "databasename.mdb"
    objAccess.DoCmd.OutputTo 3, "reportName", "Snapshot Format (*.snp)", "snapshotname.snp", 0
    objAccess.DoCmd.Quit 2

It shows the error in my IE browser.

error '800a1eba'

if i trap the error through asp code it shows below message.

Microsoft Access can't open the database because it is missing, or opened exclusively by another user.

What should be the reason of this error ?

Please help me?
Thanking in advance.


  #2 (permalink)  
Old July 20th, 2004, 08:42 PM
Friend of Wrox
Join Date: Sep 2003
Location: Mentiri, Muara, Brunei.
Posts: 363
Thanks: 0
Thanked 1 Time in 1 Post

hi vinod,
  Make sure the database is exist in that path and spelled correctly.
Response.write the statement

    response.write request.servervariables("APPL_PHYSICAL_PATH") & databasename.mdb

  #3 (permalink)  
Old August 4th, 2004, 06:27 PM
Friend of Wrox
Points: 6,664, Level: 34
Points: 6,664, Level: 34 Points: 6,664, Level: 34 Points: 6,664, Level: 34
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Join Date: Jan 2004
Location: Sydney, NSW, Australia.
Posts: 1,870
Thanks: 12
Thanked 20 Times in 20 Posts
Send a message via AIM to mat41

There are all sorts of Access Driver/connection string methods, the location of your database compared to how it is refered to in your connection string is xtremly important, all will crumble if incorrect.

1..what OS is on the server that houses the database?
2..What version of Access?

Your connection string look very wierd, I have not seen it used in this way before - however as I said there are many methods. If your server is running win 2K or later this will work.
("../DB/databaseName.mdb") is very important. What this means is the file that the physical connection string resides in is NOT AT ROOT LEVEL. I place myn in the scripts directory as a .inc file this is why the ../ is required. The database is in a dir called DB at the root level so:
  Dim Conn

  Set Conn = Server.CreateObject("ADODB.Connection")
  Conn.open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("../DB/databaseName.mdb")
save all between the -------- and call the file whatever (global.inc perhaps) then at the head of every page you want a connection place

do forget to close the connection at the foot of every page it is opened. Access is good for what it is, however its errors are very un friendly - try to get onto sqlServer or mySql

Wind is your friend

Similar Threads
Thread Thread Starter Forum Replies Last Post
The Microsoft Jet database engine cannot open .mdb hunzian78@yahoo.com ASP.NET 1.0 and 1.1 Professional 13 February 1st, 2007 12:47 PM
Microsoft Jet Database Engine Cannot Open hunzian78@yahoo.com ADO.NET 3 February 23rd, 2006 01:40 PM
Problem Connecting to Microsoft Access Database eric_lim_1 Classic ASP Databases 1 September 17th, 2005 03:12 AM
Microsoft Access can't open the database because. vinodkalpaka Classic ASP Databases 2 July 24th, 2004 04:37 PM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.