Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8466101
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T15:14:35+00:00 2026-06-10T15:14:35+00:00

Ok I have a Ado DB table name is [pass] fields are [id] [Machine]

  • 0

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;
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T15:14:37+00:00Added an answer on June 10, 2026 at 3:14 pm

    This is a good starting point I believe. I use it in my application to load two tables:

    procedure TdlgTestsSections.LoadSections;
    var
      AllSectionsNode, SectionNode, SubSectionNode, AllParamsNode,
      i: Integer;
    begin
      tvSections.Items.Clear;
      AllSectionsNode := tvSections.Items.AddNode(nil, nil, 'All Sections',
        Pointer(0), naAddFirst);
      dmLabData.qTestSections.Requery;
      while not dmLabData.qTestSections.Eof do
      begin
        SectionNode := tvSections.Items.AddNode(nil, AllSectionsNode,
          dmLabData.qTestSectionsName.Value,
          Pointer(dmLabData.qTestSectionsID.Value), naAddChild);
        dmLabData.qTestSubSections.First;
        while not dmLabData.qTestSubSections.Eof do
        begin
          SubSectionNode := tvSections.Items.AddNode(nil, SectionNode,
            dmLabData.qTestSubSectionsName.Value,
            Pointer(dmLabData.qTestSubSectionsRowNo.Value), naAddChild);
          SubSectionNode.Expanded := False;
          dmLabData.qTestSubSections.Next;
        end;
        dmLabData.qTestSections.Next;
      end;
    end;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have tried with ado.net create table columnName with unique name. as uniquename I
I have a database table with three fields: Product(ProdId, Name, Price) Where ProdId is
I have an ADO.NET Managed Data Provider that is registered in machine.config in DbProviderFactory
I have an xml file which contains query details like <queries> <query> <name>GetStudentById</name> <statement>select
I have a Linq expression which I'd like to insert to a ADO.NET datatable.
I have a simple ADO.NET Entity Framework 4.0 model (edmx) which defines database tables
I am trying to develop an application using ADO.NET. I have two tables in
I have ADO.Net code as below, that calls a stored procedure. Within the stored
I have a ADO.NET/TSQL performance question. We have two options in our application: 1)
Suppose I have an ADO.NET DataTable that I was to 'persist' by saving it

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.