Can't append records to SQLite3-DB's

In this forum we will discuss things relating the ZEOSLib 6.6.x stable versions

Moderators: gto, EgonHugeist

Post Reply
merlin352
Fresh Boarder
Fresh Boarder
Posts: 7
Joined: 15.10.2009, 12:20

Can't append records to SQLite3-DB's

Post by merlin352 »

Hello

I want to add several records to 2 SQLite3-DB's which are empty on startup. I use TZTable to connect to the tables.

Here is the monitor log :

Code: Select all

2009-10-20 10:49:17 cat: Execute, proto: sqlite-3, msg: INSERT INTO PhysPersons (ID,matricule,nom,prenom,adresse,pays,cp,ville,nationalite,sexe) VALUES (NULL,'19709999000','XYZ Abcdef',NULL,NULL,'D',NULL,NULL,'D',0)
2009-10-20 10:49:17 cat: Execute, proto: sqlite-3, msg: SELECT LAST_INSERT_ROWID()
2009-10-20 10:49:17 cat: Execute, proto: sqlite-3, msg: INSERT INTO Salaries (ID,firme,salarie,salaire,h_travail,h_base) VALUES (NULL,9,1,1.38502612880718,40,2)
2009-10-20 10:49:17 cat: Execute, proto: sqlite-3, msg: SELECT LAST_INSERT_ROWID()
.
.
.
.
.
My Connection is in AutoCommit-Mode, no CachedUpdates on the Table. i add 26 records to both tables, but at the end, the tables are empty.

When I use a Connection.StartTransation before adding the records an a Connection.Commit afterwards I get the following. First the same log than before... and at the end the error :

2009-10-20 10:49:17 cat: Execute, proto: sqlite-3, msg: COMMIT TRANSACTION, errcode: 5, error: database is locked

But there is no other Process running which has this DB opened.

Someone has an idea?
niztor
Fresh Boarder
Fresh Boarder
Posts: 10
Joined: 04.11.2005, 19:05

Post by niztor »

What version of Zeos are you using ?
I was playing with sqlite3 and Zeos 6.6.5 a couple of days ago and i experienced the same with TZQuery. Then i switched

Code: Select all

TransactIsolationLevel := tiNone
and that worked for me.
merlin352
Fresh Boarder
Fresh Boarder
Posts: 7
Joined: 15.10.2009, 12:20

Post by merlin352 »

I use 6.6.5 stable.

I found out what happened. I had installed the Firefox-plugin to admin SQLite3, and it was in AutoOpenMode. So Firefox was running and the plugin opened my database.

I have deinstalled the plugin, also because it is not very handy and use SQLite expert now. It is also free.

best regards
Post Reply