On Wed, 25 Aug 2004, Marc Pitoniak wrote:

>>>
>>>Is there something comparable that I can do programmatically using SQL
>>>syntax in my program?
>>>
>>>(I've tried various combinations of "insert into sample as select from
>>>'import.txt'" with no success)
>
>>Browse the source of sqlite3.exe, and copy the .import command from there
>>if you're not happy using sqlite3.exe as is.
>
>I'm using Borland CBuilder and have not been able to build sqlite3.
>But your idea has merit. Maybe ".import" uses sql?


sqlite3 is built from sqlite/src/shell.c. You can use any part of that
verbatim, you don't have to compile sqlite3 seperately.

.import is implemented using the regular sqlite3 API, reading from the
file and transalating the data into SQL commands. The code can be found
from line 912 of shell.c in the latest CVS. Just cut and paste the code
segment into your own application and fill in the parameters.


>
>Thanks,
>Marc
>

Christian

-- 
    /"\
    \ /    ASCII RIBBON CAMPAIGN - AGAINST HTML MAIL
     X                           - AGAINST MS ATTACHMENTS
    / \

Reply via email to