i have a Sqlite-Database containing some integer values, for example 6410. I have to divide by 100, (= 64.10).
My try:
procedure TForm1.NxDBTextColumn1SetCell(Sender: TObject; ACol, ARow: Integer; CellRect: TRect; CellState: TCellState); var myText: string; myValue: Double; begin myText := NextDBGrid1.Cells[Acol, Arow]; myValue := StrToInt(myText)/100; myText := FloatToStr(myValue); NextDBGrid1.Cells[Acol, Arow] := myText; end;
But with this i get an exception "64,10 is not an valid integer value for Field..."
What's the right way to do this?
Thank you.