Hi everybody!

I need a tip about how sqlite3_column_double works. I hoped it returns a pointer to a 8-byte-real, but it don't.

Here is what i do:

CREATE TABLE [tblTyped] ([a] TEXT, [n] NUMERIC, [i] INTEGER, [b] BLOB)

Insert into tblTyped values('helo,,,', 1.1121, '8.0001', 'blob!!!')

then sqlite3_prepare 'Select * from tblTyped'
then sqlite3_step

now for each column:
sqlite3_column_type returns
3 2 2 3
it means SQLITE_TEXT SQLITE_FLOAT SQLITE_FLOAT SQLITE_TEXT

sqlite3_column_text returns a pointer to a string, as espected:
helo,,,|1.1121|8.0001|blob!!!

SQLITE3.sqlite3_column_int returns values as espected:
0|1|8|0

but sqlite3_column_double never returns a pointer:
68|8|8|62 (hexadecimal values)

and to get me even more confused, if called inmediatelly after
sqlite3_column_text, sqlite3_column_double returns:
68|22A|22A|62 (hexadecimal values)

Thank you in advance!
Marcelo




Reply via email to