IIS / ASP opening MDB using Access Application object
Posted on 2005-04-27
I’m trying to open a database using an instance of Access through my ASP page, as follows:
sDataFile = “R:\webapp\phonedata.mdb”
Set oAccessApp = CreateObject("Access.Application")
oAccessApp.Visible = False
This works fine on my W98 development system, with PWS. When I run this on the W2000 server, the Access application starts ok, but I just cannot open the database. When the last line executes I get the following error:
MSAccess error '800a1eba'
Microsoft Access can't open the database because it is missing, or opened exclusively by another user.
This equates to the MS Access error 7866, I believe.
The MDB file definitely exists and is definitely not opened anywhere else (there is no LDB file).
I have tried every possible permutation and combination of the following:
1) Using Server.CreateObject rather than just CreateObject (Access 97 is installed on all clients and the server)
2) Running the code on a client or on the server
3) Changing the sDataFile variable to:
i) The local path to the MDB file on the server – e.g. “C:\apps\webapp\phonedata.mdb”
ii) The URL path to the file – e.g. \\192.168.1.201\apps\webapp\phonedata.mdb
iii) The mapped path to the file, e.g. “R:\webapp\phonedata.mdb” as above
In each case, I have verified that the file can be found, using filesystemobject.fileexists(sDataFile)
Other settings I have checked:
IUSR_Supervisor (as the IIS anonymous access account for this site) has full rights to the database folder.
I tried disabling “Allow IIS to control password” for the anonymous use for this site.
I checked the system environment variables for TEMP and TMP are set to WINNT/Temp, and that this user has full rights to this folder.
Can anybody please help?
Many thanks in advance