Results 1 to 4 of 4
  1. #1
    Join Date
    Aug 2003
    Posts
    7

    Exclamation Unanswered: Copy BLOB field value to another field˛

    Hello,

    I have to identical accounts, in the same server, with the same tables.

    I want to copy one BLOB value from a specific table account into the same table on the other account.

    Frist i tried something like that:
    RsDestination.Field1.Value=RsSource.Field1.Value
    RsDestination.UpdateBtach

    but i have an error message "22005 Error in assignment. "

    So i tried something like that:
    BlobSize=RsSource.Field1.Value.Size
    BlobValue=RsSource.Field1.Value.GetChunk(BlobSize)
    RsDestination.Field1.Value.AppendChunk BlobValue
    RsDestination.UpdateBatch
    but i have the same error message

    The only way i found is to copy the value in block of 8000.
    if the RsSource.Field1.Value.Size=32000 i will have
    BlobValue=RsSource.Field10.Value.GetChunk(8000)
    RsDestination.Field1.Value.AppendChunk BlobValue
    RsDestination.UpdateBatch
    BlobValue=RsSource.Field11.Value.GetChunk(8000)
    RsDestination.Field1.Value.AppendChunk BlobValue
    RsDestination.UpdateBatch
    .....

    It works but for other reasons i need to have the value in one block.

    Why it only works with block of 8000?
    How can I copy the whole value in one block?

    hope all is clear

    Thanx a lot

  2. #2
    Join Date
    Aug 2003
    Posts
    7
    does somebody know ?

    well for it's for my work and i'm really waiting for a solution

    thanx in advance

  3. #3
    Join Date
    Aug 2001
    Location
    UK
    Posts
    4,650
    A thought

    update table1 set blobcol1=blobcol2

    Sorry, if I have misunderstood your question

    Sathyaram
    Visit the new-look IDUG Website , register to gain access to the excellent content.

  4. #4
    Join Date
    Aug 2003
    Posts
    7
    thanx for the answer...

    maybe I don't explain well

    I made a tool that copy the contains of an account (source) in another acount (destination) via odbc.

    on the destination account: I drop all the tables , create the same tables, same columns as the source account, and I copy the contains of each source tables into destination tables.

    all is working except for the blob (see my first message please)

    for all the value i do something like that
    RsDestination.Field1.Value=RsSource.Field1.Value
    RsDestination.UpdateBtach

    for the blob if i do that i have the error message.

    It's more clear ? If not i will write a sample of what I do, tomorrow because I'm not at my office right now.

    thanx

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •