请问Connection 对象的 Execute 方法和ECommand 对象的Execute 方法主要区别是什么?

解决方案 »

  1.   

    执行Recordset.Requery 时,是否会同步执行Command 对象的Execute 方法 ----动态更新
    而Connection 对象的 Execute 方法是静态的?
      

  2.   

    执行一般的SQL语句时,我用connection对象;
    如果一个Recordset对象需要保存不同的SQL语句查询结果时,我用command:
    dim rsResult as new adodb.recordset
    dim cmdQuery as new adodb.command
    ...
    cmdQuery="select * from table1"
    ...rsResult.open cmdQuery,cnn,....
    'rsResult是查询结果
    ......cmdQuery="select f1,f2,f3 from table2 where ******"
    rsresult.requery
    'rsResult中是新的SQL的查询结果。