Acess_pCommand->CommandText= "UPDATE resultSET path = '555', isChecked = '1'WHERE(songId LIKE '99')"; Acess_pRecordset=Acess_pCommand->Execute(NULL,NULL,adCmdText);
怎样知道这一句sql语句影响了几条记录?
既update了数据库中几条记录,谢谢大家

解决方案 »

  1.   

    MSDN上不是有嘛? command.Execute( RecordsAffected, Parameters, Options );
    第一参数返回影响的记录数..
    command.Execute RecordsAffected, Parameters, Options Return Values Returns a Recordset object reference. Parameters RecordsAffected Optional. A Long variable to which the provider returns the number of records that the operation affected. Parameters Optional. A Variant array of parameter values passed with an SQL statement. (Output parameters will not return correct values when passed in this argument.) Options Optional. A Long value that indicates how the provider should evaluate the CommandText property of the Command object: 或者再查一次 select @@rowcount ....也可得到影响的记录数。。
      

  2.   

    同意:
    "MSDN上不是有嘛? command.Execute( RecordsAffected, Parameters, Options );
    第一参数返回影响的记录数.....
    "