On 12 March 2012 08:35, YAN HONG YE <yanhong...@mpsa.com> wrote:
> I wanna import a text file to sqlite db, this follow code is right?
>        char *zErrMsg = 0;
>        sqlite3 *db;
>
>        rc=sqlite3_open("foods.db",&db);
>        sqlite3_exec(db, "CREATE TABLE contact (fliename varchar(128) UNIQUE, 
> fzip blob, ntest int, ntest1 int);", 0, 0, &zErrMsg);
>        sqlite3_exec(db, " .separator ',';", 0, 0, &zErrMsg);
>        sqlite3_exec(db, " .import e:/contact.txt contact", 0, 0, &zErrMsg);

No. Sqlite3 dot commands are not executed by the sqlite3 library, but by shell.c

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

>
> thanks!

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

Reply via email to