在Object Inspector 中发布的属性应该全是组件源代码中在Published 部分写下才对。 不过ADOTable的Connection属性没有这样也显示出来了,这个为什么? 需要详细的介绍!您们看它的源代码里(Published)没有connection 属性;

解决方案 »

  1.   

    你再往TADOTable的父类里看看就晓得了,Connection 属性是在 TADOTabel 的父类中继承下来的
      

  2.   


      TADOTable = class(TCustomADODataSet) // 继承自TCustomADODataSet
      ......  TCustomADODataSet = class(TDataSet, IUnknown, RecordsetEventsVt)
      published
        property Connection: TADOConnection read GetConnection write SetConnection; 
      ......
      

  3.   

    所以在ADOTable源代码中不用在发布是吧! 谢谢您! 
      

  4.   

    师傅啥,就比你会多那么一点点。这就是面向对象编程,你得建立这个面向对象观念。
    父类有了,继承它自然就不需要再写一遍,减少代码编写量。
    面向对象三大要素: 封装、继承、多态。这就是继承。
    另外另外建议你安装这个IDE助手,显示行号,语法智能提示,语法高亮等等很有帮助
    http://cnpack.org/download/unstable/CnWizards_1.0.0.648_Unstable.exe
      

  5.   

    也可以上它主页下载,选5月3日那个最新版本
    http://cnpack.org/index.php?lang=zh-cn