Breaking changes on select count (*)
Posted: Sun 10 Nov 2013 06:59
Hi
I upgraded to the latest version and to my surprise I got some crashes on this
ssql := 'SELECT COUNT(*) FROM ACTIONS';
PrepareDataset(aDataset, ssql);
Number := aDataset.Fields[0].asInteger;
Now the SQLite cannot retrieve this field as integer
a) it is a breaking change that should be mentioned somewhere
b) it is not very smart because guess what it is always an integer and if empty should return 0
now I have to do
ssql := 'SELECT COUNT(*) FROM ACTIONS';
PrepareDataset(aDataset, ssql);
Variant:= aDataset.Fields[0].Value;
Number := Variant
Now I have a hard time to call this upgrade an improvement at least for this feature
I have the same problem with the FTS tables but there I can understand it is all text not regular databases
Any thoughs? thanks
PW
I upgraded to the latest version and to my surprise I got some crashes on this
ssql := 'SELECT COUNT(*) FROM ACTIONS';
PrepareDataset(aDataset, ssql);
Number := aDataset.Fields[0].asInteger;
Now the SQLite cannot retrieve this field as integer
a) it is a breaking change that should be mentioned somewhere
b) it is not very smart because guess what it is always an integer and if empty should return 0
now I have to do
ssql := 'SELECT COUNT(*) FROM ACTIONS';
PrepareDataset(aDataset, ssql);
Variant:= aDataset.Fields[0].Value;
Number := Variant
Now I have a hard time to call this upgrade an improvement at least for this feature
I have the same problem with the FTS tables but there I can understand it is all text not regular databases
Any thoughs? thanks
PW