XL2000: "Could Not Use <File>, File Already in Use" Error Running Microsoft Query
ID: Q235091
|
The information in this article applies to:
SYMPTOMS
When you attempt to connect to a database using Microsoft Query, you receive an error message similar to the following:
Could not use '(unknown)'; file already in use.
Driver's
SQLSetConnectAttr failed
CAUSE
This error message occurs if you selected the Exclusive check box in the Select Database dialog box. Microsoft Query requires that the database be shared because it attempts to make two connections to the driver. Exclusive mode allows only one connection.
RESOLUTION
To work around this behavior, use the appropriate method for your situation.
Method 1: If You Need to Have an Exclusive Connection
Make a read-only connection and then modify the .dsn file to make the exclusive connection. To do this, follow these steps:
- On the Data menu, point to Get External Data, and then click New Database Query.
- Click the Databases tab.
- Click <New Data Source> and then click OK.
- In the Create New Data Source dialog box, follow these steps:
- In the What name do you want to give your data source box, type the name you want. For example, type MyQuery.
- In the Select a driver for the type of database you want to access list, click Microsoft Access Driver (*.mdb) and then
click Connect.
- Click Select.
- Select the .mdb file you want to use and click to select the Read-Only and the Exclusive check boxes. Click OK.
- Modify the .dsn file. To do this, follow these steps:
- On the Start menu, point to Find and then click Files or Folders.
- In the Find What box, type the name of the .dsn file. If you used the file name example from step 4, type MyQuery.dsn and then click Find Now.
- When found, open this file in Microsoft Notepad and change the "ReadOnly=1" setting to "ReadOnly=0".
- Save the file.
- Click OK.
Method 2: If You Do Not Have to Have an Exclusive Connection
- On the Data menu, point to Get External Data, and then click New Database Query.
- Click the Databases tab.
- Click <New Data Source> and then click OK.
- In the Create New Data Source dialog box, follow these steps:
- In the What name do you want to give your data source box, type the name you want. For example, type MyQuery.
- In the Select a driver for the type of database you want to access list, click Microsoft Access Driver (*.mdb) and then
click Connect.
- Click Select.
- Select the .mdb file you want to use; click to select the Read-Only check box and then click OK.
- Click OK again.
Additional query words:
XL2000
Keywords :
Version : WINDOWS:2000
Platform : WINDOWS
Issue type : kbprb
|