TAdodataSet.Create(self)显示"Undeclared indentifier:

40 | 问答知识库用户 |浏览216次
检举|收藏|2014/05/17 22:00
procedure ADOTreeView (TreeView: TtreeView; TreeADOTable:TADOTable);
    var
    TreeNode: TTreeNode;
    ADO_Tree: TADODataSet;
       procedure CreateSubTree (FNodeGrade: integer; FNodeName: string; Node: TTreeNode=nil);
       Var
       mLocalName: string;
       Ado_Tree: TADODataSet;
       mLength:integer;
       begin
       Ado_Tree:=TADODataSet.Create(self);
       Ado_Tree.ConnectionString :='Provider=SQLOLEDB.1;Persist Security Info=False;User ID=sa;Initial Catalog=Fo;Data Source=SR008';
       with Ado_Tree do
         try
         Close;
         Commandtext:='Select * from T_unit Where Substring(no,1 '+inttostr(4+FNodeGrade);
         OPen;
         First;
         While not Eof do
         begin
         mLength:=length(trim(fieldbyname('no').AsString ));
         TreeNode :=TreeView.Items.addChild(Node,copy(fieldbyname('no').AsString ,mLength-1,2)+'-'+trim(FieldByName('name').AsString ));
         mLOCALName :=FieldbyName('no').Asstring;
全部回答(0)
0人关注该问题



 加载中...