I'm trying to import .sqlite file to sqlite3 im using windows 8 pc, It's throwing an error of
expected 5 rows found 1-rest filled with null
even my table columns are fine.
can anyone please help me.
thank you in advance.
I'm trying to import .sqlite file to sqlite3 im using windows 8 pc, It's throwing an error of
expected 5 rows found 1-rest filled with null
even my table columns are fine.
can anyone please help me.
thank you in advance.
I think you can try this method. So you don't have to import/export via third-party files such as csv or any additional software. I plan to do this method to periodically copy aquired data in a RAMDRIVE-placed database to the SD-Card. Of course sqlite3 must be able to load your database in your case.
ATTACH DATABASE 'foo.sqlite' AS 'foo';
.databases
INSERT OR REPLACE INTO 'main.mytable' SELECT * FROM 'foo.mytable';
DETACH DATABASE 'foo';
.databases
check here for ATTACH syntax and here for more INSERT variations.
What you can do is use a third party tool called SQLite Database Browser (http://sourceforge.net/projects/sqlitebrowser).
Using the sqlite browser, open your database in old format (.sqlite) and then click File -> Export -> Database to SQL file.
Now, close the database. Create a new database using SQLite Browser (it automatically generates the database in the new SQLite3 format). Once a database is created, use the File -> Import -> Database to SQL file into the new database in SQLite3 format.
You use the PHP sqlite API to use an .sqlite database.
See http://php.net/manual/en/book.sqlite.php
In general you supply the path to your .sqlite file in the sqlite_open() call, see for an example the manual page of sqlite_open: