On 19 Nov 2010, at 1:52pm, Andreas Mucha wrote:

> i have to copy data from some database into an SQLite database.
> The fasted way for me would be to copy simply all tables.
> To do so i have to disable all SQLite - constraints, copy data
> and finally enable the constraints again.

There's no easy way to do that in SQLite, I'm afraid.  The fastest non-custom 
way to fill a table with data is usually the following:

1) CREATE TABLE with the variable definitions you want it to have
2) BEGIN TRANSACTION
3) INSERT all the data
4) END TRANSACTION
5) CREATE INDEX for each index
6) CREATE TRIGGER for each trigger

You can either write your conversion software to do this, or write your 
conversion software to create a big text file with the appropriate SQL 
commands, and use the '.read' command of the command-line tool to turn it into 
a database file:

http://www.sqlite.org/sqlite.html

Using a long text file is often /far/ easier to debug.

Simon.
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to