--- [EMAIL PROTECTED] wrote:
> I have a user-defined function named DECRYPT, which decrypts column data
> encrypted by my other UDF named ENCRYPT.
> 
> The UDF callback function (which does the decrypting) calls 
> sqlite3_result_blob
> after decrypting the data.  Sqlite does return the data OK...BUT!  It doesn't
> provide the data type for the column when I call sqlite3_column_decltype for
> the column.  The return value is NULL.  I must have the column data type, else
> my code can't properly interpret the value.   This must be a bug, right?

As far as I know, SQLite has to way of knowing what the column type 
is in the case of a function:

  "If the Nth column of the result set is not a table column, 
  then a NULL pointer is returned."

  http://www.sqlite.org/capi3ref.html#sqlite3_column_decltype

You can interrogate the first row's column values with 
sqlite3_column_type as a workaround (assuming the column in subsequent
rows are of the same type):

  http://www.sqlite.org/capi3ref.html#sqlite3_column_type



 
____________________________________________________________________________________
Sucker-punch spam with award-winning protection. 
Try the free Yahoo! Mail Beta.
http://advision.webevents.yahoo.com/mailbeta/features_spam.html

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

Reply via email to