Z
zpselect
Unregistered / Unconfirmed
GUEST, unregistred user!
procedure TrpDSDM.InitDataSourceList(Strings: TStrings;
const ABJ: Integer);
const
FmtSQL = 'SELECT ID, MC, SQL FROM table WHERE BJ=%d ORDER BY ID';
begin
with Dataset, Strings do
begin
BeginUpdate;
try
Clear; //Strings.clear
SQL.Text := Format(FmtSQL, [ABJ]); //DataSourceFQ.sql.text
Open;
First;
while not Eof do
begin
AddObject(DatasetFQMC.AsString, TObject(DataSourceFQID.AsInteger));
Next; //将数据集中的数据加载到Tstring中
end;
finally
EndUpdate;
end;
end;
end;
AddObject(DataSetFQMC.AsString, TObject(DatasetFQID.AsInteger));是什么意思?以及TObject(DatasetFQID.AsInteger)是什么意思?
将其加到TStrings中怎样排列的?
const ABJ: Integer);
const
FmtSQL = 'SELECT ID, MC, SQL FROM table WHERE BJ=%d ORDER BY ID';
begin
with Dataset, Strings do
begin
BeginUpdate;
try
Clear; //Strings.clear
SQL.Text := Format(FmtSQL, [ABJ]); //DataSourceFQ.sql.text
Open;
First;
while not Eof do
begin
AddObject(DatasetFQMC.AsString, TObject(DataSourceFQID.AsInteger));
Next; //将数据集中的数据加载到Tstring中
end;
finally
EndUpdate;
end;
end;
end;
AddObject(DataSetFQMC.AsString, TObject(DatasetFQID.AsInteger));是什么意思?以及TObject(DatasetFQID.AsInteger)是什么意思?
将其加到TStrings中怎样排列的?