I have a TUniSQL holding
Code: Select all
INSERT into XMLMESSDET(ID, PARENTID, TagName, TagValue, TREETop) VALUES (:1,:2,:3,:4,:5)
Code: Select all
q->Params->ValueCount=1000;
iArr1=0;
Code: Select all
q->Params->Items[0]->Values[iArr1]->AsLargeInt=...
q->Params->Items[1]->Values[iArr1]->AsLargeInt=...
q->Params->Items[2]->Values[iArr1]->AsIUnteger=...
if (s>"")
q->Params->Items[3]->Values[iArr1]->AsString=s2;
else
q->Params->Items[3]->Values[iArr1]->Clear();
q->Params->Items[4]->Values[iArr1]->AsLargeInt=...
iArr1++;
if (iArr1==1000) {
q->Execute(); // write 1000 first rows
q->Params->ValueCount=1000;
iArr1=0;
}
Code: Select all
if (iArr1>0) {
try {
q->Execute(iArr1); // write unwritten rows and return.
}
catch(...) {
iRv=-1;
q=NULL;
}
}
Monitor shows duration n/a, status pending for the insert, so the insert was asked but is pending then commit is done and insert is NOT committed.
I have to tell the same routine is called several time, could it be due to the fact that I usually update less than 20 rows and never get to execute the full 1000 rows?