If you use ODBCconnection (DSNorDSN-less) to access the remote (UNCpath) database, OLEDB will have the following error message:
Microsoft OLEDB Provider for ODBCDriverserror '80004005'
[Microsoft][ODBCMicrosoft AccessDriver]TheMicrosoft Jetdatabaseenginecannotopenthefile'(unknown)'.Itisalreadyopenedexclusivelybyanotheruser,oryouneedpermissiontoviewtsdata.
You can completely avoid this error - ASP and ActiveX support two ways to open DSN-less connections to MDB files, or access MDB files by other machines.
1.DAOdatabase(onlyforsmallload)
DimFile,Conn,RS
ConstReadOnly=False
File="//server/share/file.mdb"
SetConn=CreateObject("DAO.DBEngine.35").Workspaces(0).OpenDatabase(File,,ReadOnly)
SetRS=Conn.OpenRecordset(SQL)
2.ADO+JetOLEDBprovider
DimConn,RS
SetConn=CreateObject("ADODB.Connection")
Conn.Provider="Microsoft.Jet.OLEDB.4.0"
Conn.Open"//server/share/file.mdb"
SetRS=Conn.Execute(SQL)
You have to make sure that users using ASP have NT database and shared access rights.
If you have permission, you can also access open data connections in other machines:
'http://www.pstruh.cz
SetUM=CreateObject("UserManager.Server")
UM.LogonUser "Loginwiththerights","Password","Domain"
...
opendatabase
...
UM.RevertToSelf