Your two fields seem to be three fields???
If you could make the structure of your data more clear, we could give more detailed instructions of how to fill your treeview.
Your two fields seem to be three fields???
If you could make the structure of your data more clear, we could give more detailed instructions of how to fill your treeview.
Well, yes. This shows how you expect the data to be structured in the tree.
It does not, however, explain how you have the data presently in the access table.
Well, yes. This shows how you expect the data to be structured in the tree.
It does not, however, explain how you have the data presently in the access table.
Sorry but my data contain a reserved data, can i post in private?
Well, yes. This shows how you expect the data to be structured in the tree.
It does not, however, explain how you have the data presently in the access table.
Attached a little database
Last edited by sal21; September 17th, 2022 at 09:59 AM.
As promised, here is a small example which loads your sample db1 into a treeview.
I supposed you wanted one entry for each operation date. If that's wrong, the sample can easily be modified if you understood the principle.
OpenDB() opens the database
FillTreeVromDB() walks through the records and plants one branch for each record.
PlantTreeBranch() is recursive and will plant a new branch into the tree or return a node if that branch already exists. It makes use of the routine
FindOrMakeNode() which will return a reference to the designated node. If that node does not yet exist it creates it.
I hope that demonstrates the way of filling a tree from a database.
If you have more specific requirements, feel free to ask for help with modifications.
As promised, here is a small example which loads your sample db1 into a treeview.
I supposed you wanted one entry for each operation date. If that's wrong, the sample can easily be modified if you understood the principle.
OpenDB() opens the database
FillTreeVromDB() walks through the records and plants one branch for each record.
PlantTreeBranch() is recursive and will plant a new branch into the tree or return a node if that branch already exists. It makes use of the routine
FindOrMakeNode() which will return a reference to the designated node. If that node does not yet exist it creates it.
I hope that demonstrates the way of filling a tree from a database.
If you have more specific requirements, feel free to ask for help with modifications.
IS EXACTLLY WATH I NEED!!!
i LO... YOU!
tKS!
But...
In original project i have export my access mdb on a SqlServer 2005.
Not experience... an Sql Server.
1) i need a good connection string to coonect on SqlServer (and check a a good timeout)
2) wath is the relevant field to indexed
3) how to open a at table on SqlServer to write new data
4) Tath is all
5) sorry for my bad english but i have understand you understand me on fly!.( i'm Napolitan people.... i know well, sure only a spaghetti and pizza, not english:-))
Note:
If you want to change a litle word tell me if have an account on msger, skipe or fb... send me in private, naturally if you want:-)
Last edited by sal21; April 5th, 2011 at 01:47 PM.
I'm not familiar to SQLServer 2005. But the princple should be the same.
For the proper connection string you will surely find it here: http://www.connectionstrings.com/
Data handling should be identical to ADO as before, so writing new records should work as before.
If you prefer SQL, however, you'd need an Insert statement, but don't ask me, I'm not the SQL crack here.
* The Best Reasons to Target Windows 8
Learn some of the best reasons why you should seriously consider bringing your Android mobile development expertise to bear on the Windows 8 platform.