Click here to Skip to main content
14,641,850 members
Rate this:
Please Sign up or sign in to vote.
See more:
Hi all,

I have developed an application which uses MS ACCESS database to store data from the frontend. I have created the exe file by adding the database file which i used for developing. The problem is when i install the package in other system the database opens as read only & i am not able to write data into it. What can be done inorder to overcome such problem. Any help will be appreciated.

Thanks in advance.
Posted
Rate this:
Please Sign up or sign in to vote.

Solution 3

Try;
Right click -> Properties -> Unblock

if it is already unblocked

Open file -> Database Tools Tab -> Users and Permissions
Check if Read/Write is allowed

If it is ok too,

Move folder to My Documents folder and try to run again. If it succeeds, it is related with Windows permissions and you can't modify a file under that directory with your unknown publisher installer.
   
Comments
ZurdoDev 15-Apr-14 21:58pm
   
Good explanation. +5
Jagadisha_Ingenious 16-Apr-14 1:17am
   
@Emre Ataseven: As per your instructions i did move the file to MyDocuments folder & checked it works out. So how do i place this database file in target machine's MyDocuments folder while creating the exe file.
Emre Ataseven 16-Apr-14 1:24am
   
You can create a folder in target's personal folder and install access file under it with install shield. And don't forget to modify your connection string.
Rate this:
Please Sign up or sign in to vote.

Solution 1

We can't really answer that directly - a lot depends on how you installed the DB in the first place.

But...a common problem is installing the DB in a folder that doesn't have any write access - such as the root directory of any fixed disk, or sometimes in the application folder.

Have a look here: Where should I store my data?[^] - it gives some "safe" places to store data which may be a better idea, and could solve your problem.
   
Rate this:
Please Sign up or sign in to vote.

Solution 2

When you install your application, does the database get installed to a path under the %ProgramFiles% location?

If it does, sometimes access to this path is restricted for users, hence you seeing the read only issue.

Can you try telling the installer to copy the database to a location under either the %USERPROFILE% or %PUBLIC% directories?
   

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




CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100