Re: Problem accessing Access/Jet databse: Could not lock file

From: Kevin Yu [MSFT] (v-kevy_at_online.microsoft.com)
Date: 05/18/04


Date: Tue, 18 May 2004 07:50:38 GMT

Hi Michiel,

First of all, I would like to confirm my understanding of your issue. From
your description, I understand that you received an error which says "Could
not lock file" when opening a connection to an Access database on a network
shared folder. If there is any misunderstanding, please feel free to let me
know.

Since the .mdb file can be opened using Access and everything can be done,
I think there might be something wrong with the way you open it in your
code. If you're using an OleDbConnection object, could you show us your
connection string? You can also try to use the following one:

Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=\\ServerName\Folder\Data.mdb;Mode=Share Deny None;Persist Security
Info=False

Please also check if the file has been opened by other users. If the file
is open, there will be a .ldb file with the same name as the .mdb file in
the same folder. If that file exists, please delete it and try to connect
again.

HTH.

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."



Relevant Pages

  • Re: Failed to acces the SQL Server table from MS Access by ODBC Li
    ... How can I provide the user name and password in the connection string? ... My link table is stored in the access database, I have checked the save password check box when I set up the odbc link table. ... because your asp code is running under the context of the ... This email account is my spam trap so I ...
    (microsoft.public.inetserver.asp.db)
  • Re: Permissions error trying to open MDB file with ODBC
    ... I have set the sharing/security on the folder where the MDB file ... Do you use an UNC path or a mapped drive? ... Do you use a DSN-less connection with a connection string? ... Try the DSN way, first local, then remote. ...
    (comp.lang.php)
  • Thank U !! - Re: Access looks for a particular drive.
    ... The suggestions you offered were of great and instant help. ... > locate the .mdb file in the first place. ... >>A colleague was programming our Access database before I was asked to ... >> few changes on it because we changed PCs. ...
    (microsoft.public.access.forms)
  • Re: Jet Database Wont Open
    ... Paul did in ... to create the connection string and to create a Dataset. ... is stored in an Access database. ... When I use the DataAdaptor to preview the ...
    (microsoft.public.dotnet.languages.vb)
  • Re: (Leo) ADO Connection Error
    ... - You probably know this one, specifies ... If you were using user-level security instead of or ... I have an Access mdb file with exclusive file password. ... Is there a difference between the connection string password and ...
    (microsoft.public.access.externaldata)

Quantcast