PRB: File '(unknown)' , Exception Occurred, or No Data Using Recordset DTCs (234205)
The information in this article applies to:
- Microsoft Visual Studio, Enterprise Edition 6.0
This article was previously published under Q234205 SYMPTOMS
When you use the Recordset Design-Time Control (DTC) to connect to a Microsoft Access, Microsoft FoxPro, or other file-based database through an Active Server Pages (ASP) page, you may receive one of
the following errors:
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.
/AccessErrors/SysDE.asp, line 26
Microsoft OLE DB Provider for ODBC Drivers error '80004005'
[Microsoft][ODBC Microsoft Access Driver] '(unknown)' is not a valid path. Make sure that the path name is spelled correctly and that you are connected to the server on which the file resides.
/AccessErrors/SysDE.asp, line 26
Also, with DECommands selected as the object in the Recordset DTC, the following error appears:
error '80020009'
Exception occurred.
/AccessErrors/SysDE.asp, line 23
Or no errors occur, but no data is displayed. This may happen if
the Recordset DTC is on an .htm page, or if the Scripting Platform is
specifically set to use Client-side.
RESOLUTIONWorkaround 1
Following is the recommended workaround, unless you are using the DECommand:
- Create two system data connections. One on the Server (Production ) machine, and one on the Client (Development) machine. Make sure that they have the exact same name.
- When your page is ready to be viewed in the browser, Modify the information in the Global.asa so that both the client and server are able to understand it. Look for an application variable set up in the Application_OnStart subroutine of the Global.asa that resembles the following code:
Application("Connection1_ConnectionString") = "DSN=SysDSN;DBQ=M:\Databasename.mdb;DriverId=281;FIL=MS Access;MaxBufferSize=2048;PageTimeout=5;"
Change this to the following code:
Application("Connection1_ConnectionString") = "DSN=SysDSN;"
This forces the Web server to use the information in the data source
contained on its own system to connect to the database rather than the inconsistent pathing information in the connection string.
NOTE: If you make additional changes to the Global.asa file, the full path returns to the ConnectionString, and you will need to modify them again. This is by design.
Workaround 2
If you are using the DECommand object, the information to connect to the database is held in the DataEnvironment.asa file, which is a binary file, and cannot be modified in the same way as the Global.asa. In this case, to resolve the issue you must make sure that the path given is one that both the client and server understand. The best way to do this is to set up the same directory structure on the two machines, sometimes referred to as "mirrored directories."
- Create a folder off of the C: drive called "Data" on the development machine.
- Do the same on the server machine.
- Place a copy of the database in C:\Data on the client machine.
- Place another copy of the database in C:\Data on the server machine.
- Create a system data source name (DSN) on the client that connects to the database on the client.
- Create a system DSN on the server with the same name as the DSN on the client.
NOTE: The above method works, but when you are working with the Data Tools you are manipulating the database on the development machine, and when you are viewing in the browser, you are manipulating the database on the server machine. This also works for the table object in lieu of modifying the Global.asa.
STATUS
This behavior is by design.
REFERENCESFor additional information, click the article numbers below
to view the articles in the Microsoft Knowledge Base:
178215 HOWTO: Configure VID to Work with an Authenticated Web Project
Modification Type: | Major | Last Reviewed: | 9/30/2003 |
---|
Keywords: | kbprb KB234205 |
---|
|