Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Primary key problem
Message
From
26/10/2001 14:00:57
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
26/10/2001 13:51:03
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00573665
Message ID:
00573821
Views:
27
Instead of node index directly use the node key. It's typically is your character primary key. ie: nodes(nIndex) and nodes('00004') both work. You don't need to follow indexes. Table looks like :
NodeKey       ParentKey    NodeText
------------- ---------    --------
charles_mary               Root parents
sue           Charles_Mary Sue is single
fred_beth     Charles_Mary Fred and Beth were married in 1997
NodeKey is char and your table's PKId.
nodes('sue') work whatever its current index is. Check UT magazine June issue for sample with testdata and folders (with code).
Cetin

>Hi,
>
>Thanks for your reply. I realized the way I am doing this will not work and in the long run give more troubles. Do you know of a good way I could 'relate' the treeview to a table? For example, if I click on a leaf or node how can I determine which record in my table this corresponds to. I was using the node.index before but I don't think this will work.
>
>Thanks,
>Chris
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform