Topic: Dilemma character string function with variable not working
Hello Dimitri, If placing the concrete work, but with a variable not working
procedure Form1_TableGridCent_OnCellClick (Sender: string; ACol, ARow: Integer);
var
id: integer;
c: string;
begin
//meniu.TableMeniu.Color := clLime;
//Form1.TableGridCent.Color := clLime;
Form1.Label4.Caption := 'Id cazan = '+IntToStr(Form1.TableGridCent.dbItemID);
Form1.TableGrid1Piesa.ClearRows;
c := SQLExecute ('SELECT Centralizator.Serie_aparat FROM Centralizator WHERE id = ' + IntToStr(Form1.TableGridCent.dbItemID) );
Form1.Label5.Caption := 'Serie cazan = '+c;
[b]Form1.TableGrid1Piesa.dbFilter := 'piesa.idcazan = "c"'; //not works
[u]//works // Form1.TableGrid1Piesa.dbFilter := 'piesa.idcazan = "21103600100079933100005585N9"';[/b][/u]
Form1.TableGrid1Piesa.dbUpdate;
end;
Thank !!