Failed to update .mdf database because the database is read-only (Windows application)

I created a windows database application using in c #. My application runs successfully on Windows XP, but it does not run properly on Vista or Windows 7. My application displays a message similar to

Failed to update .mdf database because the database is read-only

Can someone give me a solution?

+2
source share
4 answers

MDB , , - ApplicationData,

+1

, Windows XP Windows Vista/7, - UAC, , , , / "" , %programfiles% ( C:\Program Files C:\Program Files (x86)). Windows XP, Windows Vista.

DATA %programdata% ( C:\ProgramData), %appdata% ( C:\Users\USERNAME_GOES_HERE\AppData\Roaming), . .

, , , . Windows , , %programfiles% .

+8

, localdb, :

myfolder/mysolution/myproject/App_Data/something.mdf

, (myfolder), Properties, Edit, Users, Modify Modify ( ), Apply.

, , , , localdb, .

0

, ​​, , Properties → Security → Group Username ( )

If for the user, if he is not configured for full control, press EDIT → Select user and give full control.

-1
source

All Articles