AppendChunk
-
Hi all, I've been working on a conversion app, that is a one off application... basically reading data from one table and inserting it into a new table. I'm using AppendChunk to insert the new record into the destination table... now on to the problem. When I append the data to the field it seems that this is being done asynchronously and when I try to free the memory I’m getting an exception that says the memory is locked. Here's the snippet of code: This code is inside a try/catch block
... //Assign the Safe array to a variant. _variant_t varChunk; varChunk.vt = VT_ARRAY|VT_UI1; varChunk.parray = ChunkBlock; //SafeArrayLock(varChunk.parray); pRs->Fields->Item["Data"]->AppendChunk(varChunk); //SafeArrayUnlock(varChunk.parray); hr = pRs->Update(); pRs->Close(); SafeArrayDestroy(varChunk.parray); ...
My questions are; is AppendChunk an asynchronous operation? And if so, is there a way to force it to be synchronous? Thanks for any help or pointers... Dave "Dak Lozar" Loeser When access is allowed to a member, it said to be accessible. Otherwise, it is inaccessible. - MSDN:C# Programmer's Reference