Link to home
Start Free TrialLog in
Avatar of Balshe
Balshe

asked on

Representing(Storing) Tree Structure In Access DataBase +Tree Structure SourceCode In Vb

What I Need Is How to represent a tree structure in Access database , how should i build the database and tables,or if you can give me the source code for Tree structure using Vb Code .
Thank You Very Much

Avatar of TimCottee
TimCottee
Flag of United Kingdom of Great Britain and Northern Ireland image

To represent a tree structure is actually quite simple, you need one table:

NodeID
ParentID
Description

This will allow you to identify each node uniquely and also the parent node of each item. You can easily read this table and create a treeview to display this information and vice versa write the contents of a treeview to a table with this structure.
ASKER CERTIFIED SOLUTION
Avatar of RodStephens
RodStephens

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Éric Moreau
Avatar of Balshe
Balshe

ASKER

DEAR SIR
Mr. Rod Stephens
Thank you for your answer

As you know I've accepted your answer

I need to ask you about your book "Visual Basic Graphics Programming"
I bought your book 2 years ago
 I liked it very much, and enjoyed the book until chapter 6

Where in every form_load you but the following

 
  If Not GetDeviceCaps(hdc, RASTERCAPS) And RC_PALETTE Then
        Beep
        MsgBox "This monitor does not support palettes.", _
            vbCritical
        End
    End If

What I get after reaching the first Line is Runtime error 6 "overflow"
Though I have tried the same code on many computers with different VGA Cards
And Different Monitors
What is wrong?
And how should I solve this problem.

Sorry for using Experts-Exchange but it's the only way for contacting you since I couldn't find your email on any other Book or Site

Thank you very
I hope you keep writing in the same way
Avatar of Balshe

ASKER

DEAR SIR
Mr. Rod Stephens
Thank you for your answer

As you know I've accepted your answer

I need to ask you about your book "Visual Basic Graphics Programming"
I bought your book 2 years ago
 I liked it very much, and enjoyed the book until chapter 6

Where in every form_load you but the following

 
  If Not GetDeviceCaps(hdc, RASTERCAPS) And RC_PALETTE Then
        Beep
        MsgBox "This monitor does not support palettes.", _
            vbCritical
        End
    End If

What I get after reaching the first Line is Runtime error 6 "overflow"
Though I have tried the same code on many computers with different VGA Cards
And Different Monitors
What is wrong?
And how should I solve this problem.

Sorry for using Experts-Exchange but it's the only way for contacting you since I couldn't find your email on any other Book or Site

Thank you very
I hope you keep writing in the same way