Link to home
Start Free TrialLog in
Avatar of ba272
ba272

asked on

OleDbConnection and sharing a folder, "Could not lock file."

Hi,

I have a working database connection that I need to share across the network.  But when I share it using Windows Explorer, the connection.Open() call generates an exception.  "Could not lock file."

Any ideas?


Thanks,
Bob

Avatar of ba272
ba272

ASKER

Here's what my string looks like:

conn.ConnectionString = @"Provider=Microsoft.Jet.OLEDB.4.0;" + @"Data source=" +
"C:\Database.mdb" + ";Mode=Read";
ASKER CERTIFIED SOLUTION
Avatar of melodiesoflife
melodiesoflife

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of ba272

ASKER

Oh I see.  The other computer didn't have the requisite write permission so it could create the ldb file.  That's right.

Thanks.