ADOQUERY->add("insert into tab1 select * from tab2 where ....")
ADOQUERY->execsql();
----------------------------------我想知道增加了(insert into tab1)多少记录?

解决方案 »

  1.   

    帮助中这么说:int __fastcall ExecSQL(void);DescriptionExecSQL returns an integer value reflecting the number of rows affected by the executed SQL statement.试试这样int i = ADOQUERY->execsql();//I 就是更新了的记录行数
      

  2.   

    不是的,delete 1452条记录它返回是1
      

  3.   

    C++ syntax:__property int RowsAffected = {read=GetRowsAffected, nodefault};DescriptionInspect RowsAffected to determine how many rows were updated or deleted by the last query operation. If no rows were updated or deleted, RowsAffected has a value of zero. RowsAffected will have a value of ? if the execution of the SQL statement could not be executed due to an error condition. This latter situation would typically follow the raising of an exception.
      

  4.   

    int Count=Query1->RowsAffected;