数据结构如下:
CREATE TABLE [tbTree] (
[ID] [varchar] (4) COLLATE NOT NULL ,
[Context] [nvarchar] (50) NULL ,
[ParentID] [varchar] (4) NULL ,
CONSTRAINT [PK_tbTree] PRIMARY KEY CLUSTERED
(
[ID]
) ON [PRIMARY]
) ON [PRIMARY]
代码如下:
lprocedure TForm1.ReadTree(tnode:TTreeNode;Fvalue: String); lVar l i: integer; l Flist:TStringList; l Flist1:TStringList; l str:string; lbegin l qryTree.close; l qryTree.sql.clear; l qryTree.sql.add('select Parentid,id,context from tbtree');...[ 查看全文 ]