Click here to Skip to main content
15,914,452 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi, I created an application in C# that uses an MS Access database. I created the installation file, but after the installation of the application the database remains read-only, ie. I can't record in the database. What could be the problem?

What I have tried:

When I start the application as administrator, things are OK
Posted
Updated 25-Feb-21 18:21pm

The first thing to check is where you installed the DB file: if it's under the same folder as your EXE file, then in release versions it'll always be read only because Program Files and all subdirectories are protected for security and to prevent viruses.

See here: Where Should I Store My Data?[^] for some better places.
 
Share this answer
 
This should help (substitute Access for SQL CE).

Access to database file not allowed (SQL Server Compact) in Visual Studio 2010 C# - Stack Overflow[^]

In some cases, one might Admin privileges via the Manifest file.
 
Share this answer
 
I installed the application in C: there are no problems
 
Share this answer
 

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



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