If you connect to the MDB file of a remote computer using ODBC (DSN or other methods), this will generate an error:
Microsoft ole db provider for ODBC drivers error '000000' indicates that the file may be accessed by another user or has insufficient permissions.
There are two ways to avoid this error:
Method A. Access by using Dao Engine
Dim file, Conn, RS
Const readonly = false
File = "\ Server \ share \ file. mdb"
Set conn = Createobject ("Dao. dbengine.35"). workspaces (0). opendatabase (file, readonly)
Set rs = conn. openrecordset (SQL)
Method B. Ado + JET OLE DB Provider
Dim Conn, RS
Set conn = Createobject ("ADODB. Connection ")
Conn. provider = "Microsoft. Jet. oledb.4.0"
Conn. Open "\ Server \ share \ file. mdb"
Set rs = conn. Execute (SQL)
Make sure that you have sufficient access permissions to access the MDB file on the remote computer when running the ASP page. before accessing the MDB file, log on to the remote computer and add the followingCode:
Set um = Createobject ("usermanager. Server ")
Um. logonuser "Account", "password", "Domain"
...
Open Database
...
Um. reverttoself