Click here to Skip to main content
15,400,295 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i have windows application with access database
but when i create a setup file and installl on c drive it gives me error :
"Operation must use an updatable query"

then i set permisson of my database to full

and that error be disappear but now i see another error :

Could not use ''; file already in use

Plz! some one help me it's Urgent.
Updated 16-Apr-13 0:04am

1 solution

file already in use means your table from database file is open at the time of database transaction close all the tables from access database.
if any of table is open from your database then application throws this exception
NABIN SEN 16-Apr-13 6:14am
it gives error when i install in c drive if i installl other drive then c then it doesn't give error msg....
vinayakJJ 16-Apr-13 6:16am
did you add database file to your setup project
NABIN SEN 16-Apr-13 6:16am
ya i added..
vinayakJJ 16-Apr-13 6:29am
it shouldnt give the file in use exception at the time of installation
coz in your set up project another instance of file is added so file will not be in use.
can you post the connection string?
NABIN SEN 16-Apr-13 6:37am
i am using aapconfig file to connect with database
connection is-public static string DbConn = ConfigurationManager.ConnectionStrings["ConStr"].ConnectionString;
vinayakJJ 16-Apr-13 6:39am
where is the path of database file ?
NABIN SEN 16-Apr-13 6:38am
it's give problem in window 7 not in xp
vinayakJJ 16-Apr-13 6:41am
set the Write permission to the whole folder where the MDB file is stored
NABIN SEN 16-Apr-13 6:42am
<add name="ConStr"
="" connectionstring="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=|DataDirectory|\RestroManagement.mdb" providername="System.Data.OleDb">
vinayakJJ 16-Apr-13 6:47am
does it work??

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900