Microsoft Visual studio is most using integrated development environment (IDE) to create software and applications.
C# (C sharp), VB (Visual Basic) and ASP (Active Server Pages) are the most popular languages in Visual studio.
In C# or VB development, database is a necessary component in most of software. mySQL and MS Access are the most using database to store textual data.
If you are using MS access as database, you may face this problem: Unhandled exception has occurred in your application. If you click Continue, the application will ignore this error and attempt to continue. If you click Quit, the application will close immediately.
Operation must use an updateable query.
In normal case, you may not face this problem, and if you create a setup file for your software, after installation, you may face this error.
If you can’t fix this error, then there is no mean by your new software.
At the time of installation, your access file (whether mdb or accdb) can’t establish enough permission on installed computer. If user can give enough permission to your file, then you can avoid this error.
Due to lack of permission, your installed access database is read only.
If you open installed database, you can see like this:
“This database has been opened read-only. You can only change data in linked tables. To make design changes, save a copy of the database”.
How to fix this error ?
To fix this error, there are five solutions.
For your own or your friends’ purpose:
These 3 methods are only applicable for you and your friends, because you or your friends have to make some modification after installation. Here you have to suggest some steps to users for avoiding this error.
- Just right click on your installed software.
- From given context menu, click on “Run as Administrator”.
- Now you can run your application without facing that hurting error.
- Give ownership and full control to folder that contains your installed application.
[Right click on folder, Security tab, edit permission and give full control to current user. Change ownership by clicking on ‘Advanced’ button].
- Back up (copy) your database before installation, after installation, just replace installed database with original backup database.
For Public Usage
If you want to supply your application over internet, then you may not give enough instructions to software users.
But you can suggest these two methods to user before installation.
- Suggest to user to install your product in another drive other than C (Example: D drive or E drive)
- Before installation, just right click on setup file.
- From given context menu, click on “Run as Administrator”. Then install.
Here if you point installation to C:/Program Files, this method may not work well. So have to install your product on C drive (not to Program files folder). Example: C:/Your company/Product. Here, you have to set location for installation at time of creation of setup file.
If all these methods are not working in a network computer, then you need the permission from your server computer (Administrator).
If you still facing problem on your personal computer, then you may ask us right now…
Learn C# programs here