Link to home
Start Free TrialLog in
Avatar of adminender
adminender

asked on

Could not lock file.

Hi, i have a asp .net project which works with mdb file. every thing is fine in local. when i publich it on a hosting i get this error when opening database :

System.Data.OleDb.OleDbException: Could not lock file.

How can i solve the problem?
Avatar of Ross-C
Ross-C
Flag of United Kingdom of Great Britain and Northern Ireland image

Have you checked the file and folder permissions on the database file and folder that its in?
Avatar of adminender
adminender

ASKER

yes read and write permissions given to folder.
Not enough information. You should post the full error message. But anyhow, see if this link helps.

http://forums.asp.net/t/443499.aspx
the full error message is :

Could not lock file.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Data.OleDb.OleDbException: Could not lock file.

Source Error:

Line 473:      
Line 474:        adap.SelectCommand = sorgu
Line 475:        adap.Fill(dataset1, "okul_listesi")
Line 476:        
Line 477:        Try



if i use connections open property it gives the same error.
and did you check the stack trace?
ASKER CERTIFIED SOLUTION
Avatar of ralmada
ralmada
Flag of Canada image

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
have you checked the permissions of the actual db file also?
Thanks A lot