向3个表分别存储一条数据,怎么做快和好?
我现在用的方法
ADOtable-> Active=false;
ADOtable-> TableName= "1db ";
ADOtable-> Active=true;
ADOtable-> AppendRecord(ARRAYOFCONST(( "ABC ")));
ADOtable-> Next();
ADOtable-> Active=false;
ADOtable-> TableName= "2db ";
ADOtable-> Active=true;
ADOtable-> AppendRecord(ARRAYOFCONST(( "ABC ")));
ADOtable-> Next();
ADOtable-> Active=false;
ADOtable-> TableName= "3db ";
ADOtable-> Active=true;
ADOtable-> AppendRecord(ARRAYOFCONST(( "ABC ")));
ADOtable-> Next();
感觉自己的方法。。太罗嗦不好,有好的实现方法吗?
[解决办法]
同时操作多个表最好的方法是做个存储过程了,还有记得用事务
[解决办法]
用存储过程最好了,然后再TADOStoredProc调用存储过程,这样最快!