mithin <[EMAIL PROTECTED]> wrote:
I have a CSV file that needs to be imported into a SQLite database
and the contents of the CSV file should be inserted into various
tables of the database.

1. Will using transaction speed up this opeartion of import?

Yes. Perform all the insertions within a single transaction, or as few transactions as possible.

2. Is the following method of using transaction correct or am I
missing something ?

sqlite3_exec(DBHandle,"begin transaction;", 0, 0, NULL);
.....All the insert statements here
sqlite3_exec(DBHandle,"COMMIT;", 0, 0, NULL);

Looks good.

Igor Tandetnik

-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------

Reply via email to