On 22 Mar 2011, at 1:12pm, LacaK wrote:

>> You still don't say what you're planning on doing with these number...just 
>> displaying them?
> 
> Yes may be ...
> I am working on modification of database component for accessing SQLite3 
> databases for FreePascal project.
> We map declared column's types to native freepascal internal field types.

Here are two options which will let you get the contents back to the original 
precision:

A) Store the values as BLOBs.
B) Store the value as TEXT, but add a non-digit to the beginning of each number 
value, for example

X24395734857634756.92384729847239842398423964294298473927

Both methods will prevent SQLite from trying to see the value as a number.  Oh 
and since nobody seems to have pointed it out yet, SQLite doesn't have a 
NUMERIC or a DECIMAL column type.  The types can be found here:

http://www.sqlite.org/datatype3.html

Putting INTEGER and REAL together gives you NUMERIC, but there's no way to 
declare a column of that type, just a value.  The page actually rehearses your 
problem, showing when strings containing numeric values can be converted to a 
number.

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

Reply via email to