Ok I have a Ado DB table name is [pass] fields are
[id]
[Machine]
[Level]
[Username]
[Password]
I would like to show all the records in tree view like this
[Machine]
--|Level|
----Username
----Password
--|Level|
----username
----Password
[Machine]
--|Level|
----username
----Password
ect..
I know how to connect to db but not sure how to inport the data to the tree and declear it as a node or sublevel item.
Thanks
Glen
current code.
procedure TForm2.Button1Click(Sender: TObject);
var
Qry:TADOQuery;
selected : string;
i:integer;
begin
Qry:=TADOquery.Create(Self);
try
qry.Connection := dbconnection;
qry.SQL.Clear;
qry.SQL.Add('Select * FROM [Pass]');
qry.Open;
Qry.First;
i:=1;
with qry do
begin
while qry.RecordCount >= i do
begin
end;
end;
finally
Qry.Active:=False;
Qry.Free;
end;
end;
This is a good starting point I believe. I use it in my application to load two tables: