Hello teco049,
I had a look at your application (very interesting) and found two things :
About your application hanging :
You create a TDataSet with :
sqlquery('select * from entries',evaluate);
This is fine
Then you tell the app to shuffle through all the results with
while not evaluate.Eof do
This is fine (Eof meaning End Of File, that is to say until the last record)
Then you free the TDataSet object with
This is fine, you don't need it anymore so destroy it to avoid memory leaks
But you forgot one step, you have to tell the app that it as to step to next recordset after each completed loop with
your code should be like :
while not evaluate.Eof do
begin
checkmate := strtomd5(evaluate.fieldbyname('valueA').asstring + evaluate.fieldbyname('valueA').asstring);
recordid := evaluate.fieldbyname('ID').asinteger;
if (evaluate.fieldbyname('valueC').asstring <> checkmate) then
begin
evaluate.fieldbyname('resultb').asstring := 'true';
end
else
begin
evaluate.fieldbyname('resultB').asstring := 'false';
end;
evaluate.Next;
end;
evaluate.free;
Add that extra 'evaluate.Next' to your code and the application won't hang anymore.
Now, regarding this and your boolean problem :
//evaluate.fieldbyname('result').asboolean := true;
evaluate.fieldbyname('resultb').asstring := 'true';
Boolean are recorder as Integer, so you could do this :
evaluate.fieldbyname('result').AsInteger := 1;
This being fixed, what are you trying to achieve with this TDataSet and comparison ? Do you wan't to display in your TableGrid wether the record has been modified or not ?
Because what your are doing right now is just changing in memory the value assigned to 'result' according to a comparison. You're not updating the database nor the TableGrid column displaying the result.
Tell me what you wan't to do and I'll try to help
Cheers
Mathias
I'm a very good housekeeper !
Each time I get a divorce, I keep the house
Zaza Gabor