Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Database & SysAdmin
  3. Database
  4. AppendChunk

AppendChunk

Scheduled Pinned Locked Moved Database
helpcsharphtmlcomdata-structures
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    Dave Loeser
    wrote on last edited by
    #1

    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

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups