Emyr Thomas wrote:
> On Sep 27, 6:35 pm, Nuno Lucas <ntlu...@gmail.com> wrote:
>> Some time ago I had to do something similar and decided to write a small
>> virtual table implementation to treatCSVfiles as just another table.
>> This works for my uses which is to import Excel and OpenOffice files.
>>
>> I cleaned up the code a bit (removed non-english comments and some use
>> of functions from internal libraries), add a sqlite3_extension_init()
>> and posted the zip for the sqlite3 extension module on the wiki [1].
>>
>> [1]http://www.sqlite.org/cvstrac/wiki?p=ImportingFiles
>>
>> The code is used on both Win32 and Linux platforms, but this zip only
>> includes a makefile for Linux. It uses iconv() to handle character set
>> conversions, so that must be available if compiling for windows (or just
>>   make sure the source text file is already UTF-8).
> 
> Could you please provide some info as to how you would build this as
> an extension module on Linux?

"make" ?

It would be easier if you stated why that doesn't work for you.

All I can say is that the virtual table API is still considered 
experimental (or was last time i checked), so it's not stable across 
sqlite versions (in fact, the code doesn't compile using the bundled 
3.4.2 version on my Ubuntu 8.04 machine). You may need to install a 
recent version of SQLite or modify the Makefile to use your local library.

If your application uses malloc/realloc/free functions other than the 
glibc provided ones, you will probably need to change the code to use 
the sqlite3_malloc/sqlite3_free family of functions (something I forgot 
to do because I use the code statically linked).


Regards,
~Nuno Lucas

> 
> Thanks
> 
> --Emyr

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

Reply via email to