A
A
animr2015-09-14 11:28:08
Delphi
animr, 2015-09-14 11:28:08

What data type should the variable be?

Please tell me what type the variable should be, where I want to substitute the Query variable in order to dynamically change the name of the component in the procedure that I write myself.
procedure myProcedure(NameNewQuery: String);
begin
Query.Active := False; //Instead of this line
NameNewQuery.Active := False; //Here is a line, well something like this.
//and wherever Query substitute variable NameNewQuery
Query.Close;
dsNameDoc.DataSet := Query;
Query.SQL.Clear;
Query.SQL.Text := 'SELECT * FROM tablename';
end;

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
iloer, 2015-09-14
@iloer

The input parameter must be of the same type as the Query used,
(for FireDAC - TFDQuery
for BDE - TQuery
for dbgo - TADOQuery - )

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question