Haven't been called "Simon" often in my life, I guess there's a first for
everything! :)
You have solved it halfway, but the Services have the exact same restrictions as software in terms of what they are allowed to
manipulate (well, not exactly the same, but close enough to make no difference with your problem). You have fixed the DB and moved
it to a non-protected location, this should work very well. The only reason your service is seeing a different file is that it is
still looking at the "other" non-safe location, or at a totally different location altogether.
It can't "Look" at something non-existing, there is no magic in the system, it
must abide by the security rules (and benefit from it).
SO, did you make the service or did someone else?
If you made it, the fix is easy. If someone else, did, they may have also moved/placed the data to a separate location anticipating
the UAC restrictions. You will need to actually find the files referenced and understand which file is accessed by which system (I
mean the exact on-disk bytes, not simply the referred name). adding specific data hashes to the columns should provide a usable
tell-tale.
Once figured out, you need to find a setting or something you can manipulate, sadly I dont know your system or services so cannot
comment much without further knowledge. If you made it yourself, the solution should be self-evident.
Good luck!
On 2013/07/04 00:19, Steffen Mangold wrote:
Hi Simon,
Thanks for you quick response!
I found the same reson.
I now move my DB from "c:\program files\..." to "e:\..." (this is a separate
data partition).
The effect is now that with my DB tool (with and without admin right) I see the
same data. Fine so long! :)
But my Windows Service (under LOCAL SERICE right) still see other data. :(
I don't know how to fix this.
Regards
Steffen Mangold
---------------------------------------
This has nothing to do with SQLite sadly, but still easy to fix. It's the
WIndows UAC which is doing this to you, as it should for data that it tries to
protect.
I am guessing you have the DB in a protected location, such as somewhere within
c:\Program Files\ or in c:\Windows\ or such... or in the actual same folder as
the exe that you use.
The UAC will then copy your file (at some initial point) to a substituted "Safe" folder
and only edit that file, cleverly avoidining any system changes to the original by anyone, UNLESS
of course, you start up Admin mode, in which case Windows no longer subjects your file to the
protection, and allows you to edit/access it normally - BUT, this is now an entirely different file
with entirely different content than the one in the "Safe" location.
The "Safe" location should be somewhere inside c:\Users\YourUser\Appdata\Roaming\... etc
(Just search for it from one of these base folders). Your "other" version of the file
will be here.
Now as to fixing it, well, that is easy too - just move the file to a
non-protected place. My suggestion is of course the Appdata path itself, which
windows will allow you to change most anything in without asking user
permissions. My Documents is another option (but end-users usually fiddle
there, so if this is a end-user type program, best not).
You should never keep any config files or any files accessed by your program in
the same folder as the exe or indeed any of the mentioned protected folders.
(Standard Windows path-names exist for all users for all these special folders,
easily accessible from the shell, just google it).
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users