On 2018/08/10 12:07 PM, Lars Frederiksen wrote:
In CMD I can write to my database without problems. Can you give me a hint
about what might be wrong with my OS-setup in Windows 10?
Thank you for the answer and your help! Much appreciated!
Usually the FireDAC connections work fine out the box, especially for
SQLite (though I suggest using your own latest DLL which can be
downloaded from sqlite.org).
There are 2 typical reasons why a file can have locking difficulty in
Windows:
1 - Windows UAC is virtualizing the folder your DB is in (did you
perhaps put it in the same folder as the exe? Or any other
Windows-system folder?), or
2 - An over-zealous anti-virus is locking the file.
Now I'm having difficulty believing it's 2, because the DB is not "Busy"
or erroring out when opening, it's "Read-Only" which isn't an automatic
switch for sqlite itself or via FireDAC.
I'm also confident it's not 1 because the Windows UAC virtualization
could move the file, could even redirect to a folder where the file
doesn't exist, but I have never experienced it causing the file to open
in read-only mode in sqlite.
This leaves only the FireDAC component itself. Perhaps it has read-only
mode set in either the properties or connection parameters - could you
post for us your exact set-up of the FireDac connection? (Just say which
controls you've used and their properties, view the form as text and
copy it if needed).
Just to be sure it isn't the UAC, try and connect to an sqlite DB or
file in a safe location (such as your documents folder), see if you have
any luck.
These things usually work rather easy and straight-forward - so I'm
betting it's something small that's perhaps not obvious.
Cheers,
Ryan
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users