Thank you for the reply.
It works if the following line is added before the line
ADOQuery1->FieldByName("id")->AsInteger = 2 ;
ADOQuery1->FieldByName("id")->ReadOnly = false;
So
ADOQuery1->Insert();
ADOQuery1->FieldByName("id")->ReadOnly = false;
ADOQuery1->FieldByName("id")->AsInteger = 2 ;
ADOQuery1->FieldByName("Name")->AsString = "sms";
ADOQuery1->Post();
I am using windows xp sp2 which has MDAC 2.8 sp1 and c++ builder 2006.
I had a c++ bulder 5 program using MDAC 2.8 that I am now converting to c++
builder 2006 project.
There are some issues with respect to using server side cursors in MDAC 2.8
sp1.
I get the error "Provider cannot determine the value. Possible reasons: the
record was just created, the default value for the field was not available,
or the user has not set a new value." when using server side cursor with
batch optimistic mode. If I change the cursor to client side then I do not
get the error. The only way I can used the server side cursor without error
is to use it with optimistic lock.
Storing using client side cursor and batch optimistic lock is 11 times
slower compared to server side cursor with optimistic lock for 5000 values.
I have seen that storing using server side cursor with batch optimistic lock
is faster in c++ builder 5 and MDAC 2.8.
How to use the server side cursor with batch optimistic lock in windows xp
sp2 and MDAC 2.8 sp1?
My main intention is to reduce the storing time as I have to store large
number of values.
"Adriano Grandi" <
XXXX@XXXXX.COM >wrote in message
Quote
You must use:
ADOQuery1->Insert();
ADOQuery1->FieldByName("id")->AsInteger = 2 ;
ADOQuery1->FieldByName("Name")->AsString = "sms";
ADOQuery1->Post();
{smallsort}