Hello,

On 8 mar 2004, at 18:47, Dennis Cote wrote:

How are you interfacing to SQLite? Are you using the C API directly? If so,
are you using sqlite_exec() with a callback function (the callback API), or
are you using the sqlite_compile(), sqlite_step(), and sqlite_finalize()
(the newer non-callback API)?

I'm calling sqlite_get_table().


These APIs are described here:
http://www.hwaci.com/sw/sqlite/c_interface.html

Generally speaking, the datatype information follows the column name
information in one array, and the column data is returned in a seperate
array. For a typical result that returns 3 columns you get something like
this:


ColumnNames[]
[0] -> column 1 name
[1] -> column 2 name
[2] -> column 3 name
[3] -> column 1 type
[4] -> column 2 type
[5] -> column 3 type

Data[]
[0] -> column 1 data
[2] -> column 2 data
[3] -> column 3 data

If I understand correctly, I should write my own sqlite_get_table() function with a custom callback which stores the column data somewhere, right? Would it be better to create my own TabResult struct, to store the column data or would I be doing too much work?


Thanks a lot,

-- Tito

Reply via email to