it seems to me that you should read SQLite documentation first (ie. from sqlite.org website) and then write some code. In SQlite one database (which is a file) can contain many tables. A table once created exists until removed from database or its database is deleted.
To the point, check if the directory and file you use in "PrefsUserDataConnection.DatabaseName" is the same as in PrefsUserDataConnection setting (catalog, file?).
And FFS, tell us what OS you're using, and what version of Lazarus and FPC...
MarkMLl
On which OS? Windows has annoying file protection mechanisms and treats some file extensions in an unexpected way as system files.
heebiejeebies, I, or rather an end user of mine, experienced something like this and we eventually decided it was because he was using an open source file encryption tool, the name of which I cannot remember. (A new version of that file encryption fixed his problem, U18.04 is starting to show its age.) Do you have anything like that running ? Or is the file in question mounted as some sort of share, smb, nfs etc ?
WRT your message to Mark, I sort of agree but you really do need to understand how frustrating it can be when people ask questions without at least telling us the very, very basic information needed. But we all get along pretty well here usually ....
Davo
> VeraCrypt
yep, that was it. I suggest you look at updating (if possible) or disabling VeraCrypt and see if that affects your issue. I the case I was involved with, again, the particular file was no subject itself to Veracrypt but Veracrypt was still loaded into memory and was still hooked into the filesystem interface.
Its a suggestion anyway.
WRT Mark, he is a very knowledgeable and very helpful person in my experience.
In the Windows world these days, some file types can be deleted however, if that file is actively opened it is not fully deleted until who ever has it opened closes it or that application closes and the OS will then officially mark it as deleted otherwise a file check may return as still being there.
This is basically a shell operation that handles this. Low level calls can make a better determination otherwise.