If you use an ODBC connection (DSN or dsn-less) to access the remote (UNC path) database, OLE DB will receive the following error message:
Microsoft OLE DB Provider for ODBC Drivers error ' 80004005 '
[Microsoft] [ODBC Microsoft Access Driver] The Microsoft Jet Database engine cannot open the file ' (unknown) '. It is already opened exclusively by another user, or you need permission to view its data.
You can avoid this error--asp and ActiveX support two ways to open an MDB file's dsn-less connection, or access the MDB file by another machine.
1. DAO database (only for small load)
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)
2. 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)
You have to be sure that users who use ASP have NT databases and shared access rights.
If you have permission, you can also access open data connections from other machines:
http://www.pstruh.cz/
Set UM = CreateObject ("Usermanager.server")
Rmi LogonUser "Login with the rights", "Password", "Domain"
...
Open Database
...
Rmi RevertToSelf
Shanghai treatment of Impotence Hospital Program I hope that you understand the use of ASP open the remote MDB file method, if you still do not understand the place can also contact me yo!
ASP network programming: How to open a remote MDB file with ASP