I using Batch Update operation. It only able to handle update up to about 125 records, more than that, it was raised an error :
Dynamic SQL Error, too many context of relation/procedure/views. Maximum allowed is 256.
IBDAC ver 6.1.4, C++ Builder 6
Here are the sample codes :
Code: Select all
QUpdSrc->SQL->Text = "update t_tbl2 set ln_no = -995 where id = :ID";
QUpdSrc->Params->Items[0]->DataType = ftInteger;
QUpdSrc->Params->ValueCount = 1000;
Q->Close();
Q->Open();
int iGd = 0;
while(!Q->Eof)
{
if(!Trs->Active) Trs->StartTransaction();
// do some procssing
QUpdSrc->Params->Items[0]->Values[iGd]->AsInteger = QID->AsInteger;
Q->Next();
iGd ++;
}
if(iGd > 0) QUpdSrc->Execute(iGd);
Trs->Commit();
Access violation.
What is the limit of ValueCount for Batch Insert and Bacth Update?