D
Donald Wheeler
Hi all,
I have a critical problem - our client wants to be able to display reports
that they've made in MS Access over a web-based interface. I thought that
this would be straightforward but the following code *always* gives the '
Microsoft Access can't open the database because it is missing, or opened
exclusively by another user. ' error, regardless of whether an Access
instance is running or not (the path is correct).
---------------------------------
On Error Resume Next
Dim objAccess,filePath
Set objAccess = CreateObject("Access.Application")
filePath = Server.MapPath("commute_reporting.mdb")
objAccess.OpenCurrentDatabase filePath
If Err.Number=0 Then
objAccess.DoCmd.OpenReport "CarpoolReport", acViewPreview,
acReadOnly
objAccess.DoCmd.OutputTo 3, "CarpoolReport", "Snapshot Format
(*.snp)", "Carpool.snp"
objAccess.DoCmd.Quit 2
Else
Response.Write "Error Number - " & Err.Number & "<br />"
Response.Write "Error Source - " & Err.Source & "<br />"
Response.Write "Error Description - " & Err.Description & "<br />"
End If
objAccess.CloseCurrentDatabase
objAccess.Quit
Set objAccess = Nothing
On Error Goto 0
---------------------------------
The only non-scripting options that I've found have been extremely
expensive; has anyone else done this? Do you have any suggestions? I can't
find much if at all on this problem, other than make sure that the filename
is correct.
Thanks for your help!
Donald
I have a critical problem - our client wants to be able to display reports
that they've made in MS Access over a web-based interface. I thought that
this would be straightforward but the following code *always* gives the '
Microsoft Access can't open the database because it is missing, or opened
exclusively by another user. ' error, regardless of whether an Access
instance is running or not (the path is correct).
---------------------------------
On Error Resume Next
Dim objAccess,filePath
Set objAccess = CreateObject("Access.Application")
filePath = Server.MapPath("commute_reporting.mdb")
objAccess.OpenCurrentDatabase filePath
If Err.Number=0 Then
objAccess.DoCmd.OpenReport "CarpoolReport", acViewPreview,
acReadOnly
objAccess.DoCmd.OutputTo 3, "CarpoolReport", "Snapshot Format
(*.snp)", "Carpool.snp"
objAccess.DoCmd.Quit 2
Else
Response.Write "Error Number - " & Err.Number & "<br />"
Response.Write "Error Source - " & Err.Source & "<br />"
Response.Write "Error Description - " & Err.Description & "<br />"
End If
objAccess.CloseCurrentDatabase
objAccess.Quit
Set objAccess = Nothing
On Error Goto 0
---------------------------------
The only non-scripting options that I've found have been extremely
expensive; has anyone else done this? Do you have any suggestions? I can't
find much if at all on this problem, other than make sure that the filename
is correct.
Thanks for your help!
Donald