Forums


Aducom Software :: Forums :: Delphi SQLite Version 3.0.x Components :: Bugs/Enhancement requests
 
<< Voorgaande discussie | Volgende discussie >>
using numbers bigger then 1e19
Ga naar pagina  [1] 2 3 4 5
Moderators: aducom, aducomadmin2
Auteur Bericht
vac
do nov 22 2007, 05:44
Geregistreerde deelnemer #1095
Geregistreerd: di jul 03 2007, 09:17
Woonplaats: Sosnowiec - Poland
berichten: 15
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;(

i wrote simple demonstration program:
link

i'm new here, but i use aducom sqlite more then year and im really happy about it.

hope that someone can help me with this bug.

cheers
vac
Terug omhoog
aducom
wo jan 09 2008, 01:51

Geregistreerde deelnemer #1
Geregistreerd: wo jan 25 2006, 04:34
Woonplaats: groningen (NL)
berichten: 1561
Sorry, missed this post. It's registered.
albert

albert
Terug omhoog
vac
wo jan 09 2008, 02:22
Geregistreerde deelnemer #1095
Geregistreerd: di jul 03 2007, 09:17
Woonplaats: Sosnowiec - Poland
berichten: 15
jupi!
Terug omhoog
aducom
wo jan 09 2008, 03:11

Geregistreerde deelnemer #1
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
Terug omhoog
aducom
wo jan 09 2008, 03:25

Geregistreerde deelnemer #1
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.

albert

albert
Terug omhoog
vac
wo jan 09 2008, 04:36
Geregistreerde deelnemer #1095
Geregistreerd: di jul 03 2007, 09:17
Woonplaats: Sosnowiec - Poland
berichten: 15
hmm, i was trying to do the same thing using the sqlite3.exe and it was working fine - with calculations, inserting and etc.

unfortunetly using the sqlite administrator (which is using dll as well) there is the same problem ;/

so it looks like you can be right that is dll problem..

thanks in advance for reporting it.
Terug omhoog
vac
wo jan 09 2008, 04:52
Geregistreerde deelnemer #1095
Geregistreerd: di jul 03 2007, 09:17
Woonplaats: Sosnowiec - Poland
berichten: 15
oh, and one more think - this problem is only when u trying to insert big numbers.

if u somehow did insert big number to database (for example using sqlite3.exe) everything else working fine with dll - selecting, calculations.

in my program i v done "very temporary" fix for this problem: everytime it need to insert numeric values it run sqlite3.exe.

...but its not best deal..
Terug omhoog
aducom
wo jan 09 2008, 05:33

Geregistreerde deelnemer #1
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
Terug omhoog
vac
wo jan 09 2008, 06:06
Geregistreerde deelnemer #1095
Geregistreerd: di jul 03 2007, 09:17
Woonplaats: Sosnowiec - Poland
berichten: 15
well:

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.

thanks for quick replies finally <;
Terug omhoog
aducom
wo jan 09 2008, 06:50

Geregistreerde deelnemer #1
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
Terug omhoog
Ga naar pagina  [1] 2 3 4 5  

Ga naar:     Terug omhoog

Publiceer deze discussie: RSS 0.92 Publiceer deze discussie: RSS 2.0 Publiceer deze discussie: RDF
Powered by e107 Forum System