1,178
社区成员
发帖
与我相关
我的任务
分享
ADOQuery1->Close();
ADOQuery1->SQL->Text = "alter table "+Trim(ComboBox1->Text)+" add id counter ";
try{ADOQuery1->ExecSQL();}
catch(Exception& e){}
ADOQuery1->Close();
ADOQuery1->SQL->Text = "create index ss on "+Trim(ComboBox1->Text)+"(id) ";
try{ADOQuery1->ExecSQL();}
catch(Exception& e){}
ADOQuery1->Close();
ADOQuery1->SQL->Text = "select id from "+Trim(ComboBox1->Text);
try{ADOQuery1->Open();}
catch(Exception& e)
{ }
int recordCount = ADOQuery1->RecordCount;
ProgressBar1->Max = recordCount;
ADOQuery2->Close();
ADOQuery2->SQL->Text = "insert into dbo.NFavorites(userid,repid,cataid,inserttime,updatatime,seeable,dispOrder,doctypeNum,doctypeName,enterusername,checkusername,checkstate,checknote,"+tableStr+" fulltext,dxid,datatype,annexurl,imgurl,videourl,sufulltext) values(1,1,"+cataid+",'"+time+"','"+time+"',1,NULL,'"+num+"','"+name+"','"+user+"',NULL,'"+checkstate+"',NULL,"+valueStr+"'"+fulltext+"','"+dxid+"','0','"+annexurlVal+"','"+imgurlVal+"','"+videourlVal+"','"+sufulltextVal+"')" ;
try{ADOQuery2->ExecSQL();}