[EMAIL PROTECTED] writes:

> Please forgive me, because I know this has been covered before, but
> at the moment I'm at a loss.  I am writing an SQLite wrapper for a
> relatively new language, and one of the requirements is that the
> user be able to add and update date as if they were using an ADO
> recordset.  As a result, I need to be able to build an SQL statement
> behind the scenes that is aware of each field's data type. 

I'm not sure I understand what you want.  But here are some possible
starting points:

When using the SQLite C API, you can determine if the columns in a
result set correspond to a database table.  In this case, it is
possible to access the table definition and the column types can be
parsed [*1*].

If the result columns do not directly correspond to table columns,
then, AFAIK, the best you can do is to use sqlite3_column_type.  As
long as you don't have NULLs, this will tell you the affinity type of
the column in the result set.

Aside: it would be really nice to be able to determine affinity type
from a compiled SQL statement (result of sqlite3_prepare) and not have
to actually _step() to get this info.

[*1*] See this thread on the SQLite list:
http://marc.theaimsgroup.com/?l=sqlite-users&m=116416179332110&w=2

HTH,

+ seth

-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------

Reply via email to