hi there! i have problem using aducomsqlite while im trying to update, insert numeric values >= 1e19 while there is no such problems in different sqlite apps.
after update or insert with big number i get invalid floating point operation;(
Geregistreerd: wo jan 25 2006, 04:34 Woonplaats: groningen (NL) berichten: 1561
It appears that the error is raised in the sqlite3_step api. This is bad news, since it appears that this might be a bug in sqlite3.dll. I'm trying to investigate further. albert
Geregistreerd: wo jan 25 2006, 04:34 Woonplaats: groningen (NL) berichten: 1561
Well, if you declare the datatype as numeric then the data is stored as a full number, let's say 10000000 etc. I used REAL as datatype since the sqlite documentation declares this as a 'special' type. SQLite3 is not typeless any-more, since it is aware of text, integer and real's. Now data is stored in the database in the scifi notiatino (1e18), but the problem still persists. As far as I can tell you've found the limitation in sqlite. You can store the values as text, as long as you don't have sql calculating... I will report this to the sqlite development list.
Geregistreerd: wo jan 25 2006, 04:34 Woonplaats: groningen (NL) berichten: 1561
No it isn't indead! The components use internal Double and Extended so retrieving data is certainly no isue, but I assume you can't insert as string? Data is still stored the ansi way so your calculations would be the same? Just a work-around which might be working better then running sqlite with script. albert
with ASQLite3Query1 do begin SQL.Text:='INSERT INTO table1(value) VALUES(:value)'; ASQLite3Query1.Params.ParamByName('value').AsFloat:=1e19; ExecSQL; end;
and:
with ASQLite3Query1 do begin SQL.Text:='INSERT INTO table1(value) VALUES(:value)'; ASQLite3Query1.Params.ParamByName('value').AsString:='1e19'; ExecSQL; end;
doesn't work as well. not quite sure if i understand you correctly?
if you mind that i can use varchar or text or something else for stroning this values its not good idea for me;/ in my program im doing a lot of calculations inside sql database - it was the reason to chose database for storing values - easy calculations.
Geregistreerd: wo jan 25 2006, 04:34 Woonplaats: groningen (NL) berichten: 1561
I was hoping that your second sample would work, using text to drive the data in. But appearantly due to the datatype of sqlite it still is going wrong. In what version did things work well for you? albert