Functional requirements:
Operating environment VB.NET and Oracle9i
Since the amount of data is large, the RS result collection cannot be used once, and the TreeView node cannot be used.
Data forms in the fields that need to populate the tree node are "." Segmentation
Such as: 01 01.01 01.02 01.01.01 02 02.01 02.01 ............................
Use the Oracle's own INSTR function, you can split. And return the desired result set, initialize loading and reading without "." Field, first read with one "." ............
As for the SQLServer database, it is slightly different from Oracle's function, and you can go to Google, 9CBS and other places to find.
The approximate ways to SQL statements are as follows:
If pdotcount = 0 Then Sqlstring = "SELECT T. Requires split field, t.cname from table name T where INSTR (T.icsn, '.', 1, 1) = 0" else sqlstring = "SELECT T. Need split Field, T.cname from table name T where INSTR (T.icsn, '.', 1, "& pdotcount")> 0 and INSTR (T.icsn, '.', 1, "& (pdotcount 1 ) & ") = 0 and INSTR (T.icsn, '" & pParent & "', 1, 1) = 1" end if
Pdotcount is the number of "." in the field that needs to be read.
The pParent is then obtained by double-clicking the event, and the PParent in the SQL statement is returned to the child node that belongs to the parent node. This first level is double-click to achieve unlimited expansion until the last layer of the data is
Retrieval positioning any node
Mainly in the positioning of the initial selection node. This is slightly, if you are interested, you can contact me directly, learn from each other.
MSN: Yun15291li@hotmail.com
Email: ygyunguang@yahoo.com.cn