环境: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,则程序强行退出,问有没有好的办法,表中数据实在太多,如果插入前先查找的话效率上不能接受
方法:
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,则程序强行退出,问有没有好的办法,表中数据实在太多,如果插入前先查找的话效率上不能接受
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货