Hi everyone,
My problem is that when I open Instance1 and, in it, connect DatabaseX, then Instance2 CAN NOT open the database.
So now I put a button on the application, with which I can toggle to True/False the SQLite3Connection1, and view (in the buttons caption) the actual state of SQLite3Connection1, then Instance2 of the application CAN INDEED connect to the same database when Instance1 has connection=False.
So all this time, my real problem has not been refreshes, nor commitretainings, but simply and more fundamentally the fact that in Windows7, when SQLite1 is ON in Instance1, Instance2 can not at all even connect to DatabaseX.
My belief right now is that the issue is related to the Windows7 NEW locking system is very much involved.
I found the inability to open Instance2 a while back and asked about it, but since I had no idea of the cause, the issue got very confused.
So with this new finding, maybe someone might suggest or know of a workaround.
Also, a few weeks ago I tried to use this project in my previous XP machine, but there were quite a few messages of not being able to do it, and that's because in that machine I have a version of Lazarus and FPC of about a year ago.
I have also found web info where DESKTOP databases running in XP were giving some problems in Windows7, not necessarily Lazarus, but I believe the desktop M.S. database, I believe Access.
I also have found that the file locks systems in Windows-7 is quite different now, so that XP filelock utilities do not work.
Thanks everyone, I've been eagerly reading all the posts on this, and feel this has nothing to do with my code. The app is now finished and works just fine.
In fact, as soon as I can connect using the new button, I can do selects from Instance1 and Instance2, but only writes from one or the other.
But still my problem will be that Instance2 CAN NOT open the database, unless the connection is disabled at Instance1.
If at connection time I can send a request to the op system to change the lock value, and it is granted, maybe that would be a way out.
Otherwise, perhaps the SQLite3 connection may need some updating to cope with the Windows-7 newer locking modes (or newer features of SQLite3?).
Thanks.