Home » U++ Library support » U++ SQL » Sqlite DB readonly
Sqlite DB readonly [message #39285] |
Fri, 08 March 2013 16:20 |
|
forlano
Messages: 1185 Registered: March 2006 Location: Italy
|
Senior Contributor |
|
|
Hello,
a user of mine (using Windows 7) reported a strange problem.
His (my) program create a sqlite db but after some operation the db become read only type and no modifications were possible.
I tried to open and modify the data with the tool sqliteadmin but the data cannot be changed (it is read only as said).
It looks very strange. Does anybody met such case? What can be happened to turn a writable db in readonly mode?
Thanks,
Luigi
edit: the operative system was Vista
[Updated on: Fri, 08 March 2013 19:23] Report message to a moderator
|
|
|
Re: Sqlite DB readonly [message #39286 is a reply to message #39285] |
Sat, 09 March 2013 11:25 |
|
deep
Messages: 263 Registered: July 2011 Location: Bangalore
|
Experienced Member |
|
|
Hi Luigi,
In windows 7 some folders will be set readonly like "Prgram files" " Program Files (x86)" etc.
from
http://sqlite.phxsoftware.com/forums/p/1163/10790.aspx
Quote: |
It's sounds like you're just getting aquainted with Windows 7 security defaults. Generally speaking (and I do mean "generally"), MS now wants you to put your data bases/files in directories like "Documents" or "AppData" going forward AND to "help" us with this, they've changed the directory defaluts among other things. If you can, relocate your DB's. And naturally, there's a down side. AppData, which can be referenced directly via C: etc. has some odd characteristics...like it's invisible and you have to set bits to see it. Documents is pretty good but it can be relative to the domain environment. We ship computers/evironments with our product so have the luxury of being able to force our customers into particular directory structures.
If you really want to install your app including db in the Program files or PF x86 directory, you'll have to change the directory security to read/write as the default is now (with Win 7) read only. This is a lot trickier than it sounds and quite frankly we only did this manually a couple times and after agonizing our way through it, we decided that we'd do what MS wanted us to. (To give you a heads up, you'll change directory security in Windw Explorer and it will lie to you and tell you that you've changed it. BUT if you run your app or return to Windows Explorer, you'll see it didn't chage the setting. Next time my users piss me off, I'm writing something like this myself.) Sqlite is apparently (from our experience and deduction, not looking at the source code), seems to be subject to the directory settings in which it is located...which of course makes complete sense. You can google how to change the security for the directory but it's tricky. AND our experience is that if you add a new user to your machine, the directory security gets reset.
|
from
http://forums.realsoftware.com/viewtopic.php?f=3&t=38687
Look at last reply and link within
Quote: |
What are the permissions on the Program Data folder? Should be read only on Windows 7 all files in that folder will be made read only because of that, and you shouldn't change that setting.
On Win7
SharedApplicationData is Program Data folder which is a hidden folder and all the files in it are read only
You can change the ACL using DirectorySecurity but I'd suggest doing it in a subfolder, not Program Data.
http://blogs.msdn.com/b/amitava/archive ... se-15.aspx
|
Warm Regards
Deepak
[Updated on: Sat, 09 March 2013 11:31] Report message to a moderator
|
|
|
|
Goto Forum:
Current Time: Mon May 06 04:09:31 CEST 2024
Total time taken to generate the page: 0.02604 seconds
|