delphi ADO+sqlserver
用Adodataset还是AdoQuery控件更好?

解决方案 »

  1.   

    AdoDataSet 好  
    记得李维的<<delphi7数据库高效设计>>里面有这两个控件对比
      

  2.   

    其实TADOQuery,TADOTable都是从TADODataSet继承下来的。TADODataSet使用起来更具有一般性。通过设置TADODataSet的CommandType为以下值:
    cmdUnknown The type of command in the CommandText property is not known.
    cmdText CommandText is a textual definition of a command or stored procedure call; data returned by an internal SQL statement.
    cmdTable CommandText is the name of a table.
    cmdStoredProc CommandText is the name of a stored procedure.
    cmdFile CommandText is the name of a saved recordset file.
    cmdTableDirect CommandText is the name of a table; all columns are returned.再设置CommandText为CommandType所对应的参数,即可以模拟TADOQuery和TADOTable。
      

  3.   

    不知道那个好,我一般用AdoQuery
      

  4.   

    系统是繁体,打字切换不方便,打错一格抱歉是PSQLQuery