环境:VC6 + SQL SEVER2005
方法:
m_pConnection2->Execute("Insert into dbo.ttt (id,name) Values ('2','1')",&RecordsAffected,adCmdText);m_pConnection2->Execute("Insert into dbo.ttt (id,name) Values ('2','2')",&RecordsAffected,adCmdText);如果设置了主键id,则程序强行退出,问有没有好的办法,表中数据实在太多,如果插入前先查找的话效率上不能接受