If you connect (DSN method or other method) to the MDB file of the remote computer, this will generate an error:
Microsoft OLEDB Provider for ODBCDriverserror '80004005' roughly means that the file may be accessed by other users or does not have sufficient permissions to access.
There are two ways to avoid this error:
Method a. Use the DAO engine to access
DimFile,Conn,RS
ConstReadOnly=False
File="//server/share/file.mdb"
SetConn=CreateObject("DAO.DBEngine.35").Workspaces(0).OpenDatabase(File,,ReadOnly)
SetRS=Conn.OpenRecordset(SQL)
Method b.ADO+JetOLEDBprovider method
DimConn,RS
SetConn=CreateObject("ADODB.Connection")
Conn.Provider="Microsoft.Jet.OLEDB.4.0"
Conn.Open"//server/share/file.mdb"
SetRS=Conn.Execute(SQL)
Make sure you have sufficient access permissions to access the MDB file on the remote computer when running the ASP page. Before accessing the MDB file, you need to log in to the remote computer first, and add the following code:
SetUM=CreateObject("UserManager.Server")
UM.LogonUser "Account", "Password", "Domain"
...
opendatabase
...
UM.RevertToSelf