Share My Creation Csv to SQLite program - klaus    Apr 24, 2023   (42 reactions) I left also the previous version zip file.
EDIT: 2021.09.18
Added the use of SQLite transaction, suggested by Diceman in post #6.
EDIT: 2021.01.29
Added an exe file:
CsvToSQLiteExe.zip
You need to unzip it to get the exe file.
Unfortunately the exe file is not accepted by my McAfee anti virus prog B4A Question SQL operations in service, with transaction. The result: database is locked (code 5) - Jeffrey Cameron (first post)    Jul 09, 2024   (1 reaction) Sqlite isn't designed to be a multi-user/thread database. You might try moving your begin transaction statement down to where you actually start writing and see if that helps.
To avoid issues like this I generally I have a single SqliteManager class that handles all of the I/O requests sequential B4A Tutorial SQL tutorial - Erel    Oct 02, 2019   (20 reactions) The above code took less than half a second to run on a real device. Without the BeginTransaction / EndTransaction block it took about 70 seconds. A transaction block can also be used to guarantee that a set of changes were successfully done. Either all changes are made or none are made. By calling B4A Question SQLite remove duplicate records.[SOLVED TWICE] - Roger Daley (first post)    Oct 13, 2019   (3 reactions) rraswisak
Many thanks for your working example. For me it was a great tutorial on SQL and I was correct, my first attempts to use your suggestions screwed up the syntax. Working examples are the best teachers, I now have a little bit better understanding of SQL although I don't know what/why the B4J Question SQLite Transaction - Erel (first post)    Jan 23, 2019   (1 reaction) If you only need to make a single change then you can let the SQL engine start and close the transaction for you. In this case there is no reason not to include all of them in a single transaction (though your code is also fine). B4J Question Reading in large amounts of data in DB - PCastagnetti (first post)    Jun 28, 2017   (2 reactions) Did you use the transactions?
The use of transactions increases performance (in sqlite DB).
SQL.BeginTransaction
''Start insert loop
SQL.ExecNonQuery("your insert into.....")
''End insert loop
SQL.TransactionSuccessful B4J Question Unknown member: endtransaction - Jmu5667 (first post)    Jan 21, 2021   (1 reaction) Hi
SQL1.TransactionSuccessful - commits the transaction and ends it. Do not forget to SQL1.close to release the pool connection otherwise it will cause memory leaks for you.
Regards
John. B4A Question SQLite Cannot Save Changes - Computersmith64 (first post)    Apr 17, 2017   (2 reactions) Also - I notice you are doing a sql.BeginTransaction But there is no corresponding TransactionSuccessful or EndTransaction. You don't need to run a transaction on a single SELECT query anyway & I don't even know if it would work - but if it does, then your SELECT will fail because you haven't go B4A Question sqLite Database PRAGMA wal_checkpoint(TRUNCATE) fails - Erel (first post)    Sep 06, 2020   (1 reaction) Sounds to me that you are making things much more complicated than they need to be.
Why it is important?
SQL.TransactionSuccessful commits the transaction.
The project is too large for me to help you. If you think that there is an issue then create small project that demonstrates it. Do remember B4J Code Snippet Parse SQL Schema File Into SQLite - giannimaione (first post)    Oct 29, 2020   (1 reaction) @Erel you are rigth, but when export schema from "DB Browser" sql file is like this:
BEGIN TRANSACTION;
CREATE TABLE IF NOT EXISTS "demo" (
"id" INTEGER,
"field1" TEXT
);
COMMIT;
CREATE TABLE .....
.....
....
;
COMMIT;
on first line there is BEGIN TRANSACTION;
and on last line COMMI Page: 1   2   3   4   5   6   7   Powered by ColBERT |