Menu

#160 scan component reference for component to code

open
nobody
None
5
2022-10-13
2022-10-13
No

hello sir,
for component to code,
if i have

tblLog : TUniQuery
dsLog : TDataSource

dsLog.Dataset = tblLog

if i choose one component (not parent form), and click component to code for tblLog,
code is :
var
tblLog: TUniQuery;

tblLog := TUniQuery.Create(Self);

tblLog.Name := 'tblLog';
tblLog.SQL.Clear;
tblLog.SQL.Add('select 1');

if possible scan use component reference to this component, add to be:

var
tblLog: TUniQuery;

tblLog := TUniQuery.Create(Self);

tblLog.Name := 'tblLog';
tblLog.SQL.Clear;
tblLog.SQL.Add('select 1');

dsLog.Dataset := tblLog;

thanks

Discussion


Log in to post a comment.

MongoDB Logo MongoDB