Results 1 to 3 of 3

Thread: Binary Write add extra character :(

  1. #1

    Thread Starter
    Frenzied Member sebs's Avatar
    Join Date
    Sep 2000
    Location
    Aylmer,Qc
    Posts
    1,606

    Binary Write add extra character :(

    Hi

    I save a file(any kind) in a db in a OLE Field!

    If i read it and append it to a file with the extention it work!

    A jpeg for example!

    but, for my project, i need for info in that file, so i add tag before and after the binary content of that file, so that i can upload it to a server!

    but my problem is that my last write of my tag add unwanted charracter!!

    here my code

    VB Code:
    1. Put #freeF, , xmlContent
    2.                     While lngCurr < lngFileSize
    3.                         binChunk() = rs.Fields("attachementSource").GetChunk(intChunk)
    4.                         Put #freeF, , binChunk()
    5.                         lngCurr = lngCurr + intChunk
    6.                     Wend
    7.                     Put #freeF, , tmpXml 'this line add  the extra char

    those one ->  </_img.data_>

    can some help me, tx!

  2. #2

    Thread Starter
    Frenzied Member sebs's Avatar
    Join Date
    Sep 2000
    Location
    Aylmer,Qc
    Posts
    1,606
    damm, even if i comment the piece that write the binary file, i still get those funny charracters!

    <_img.data_>  </_img.data_>

    why o why !!

  3. #3

    Thread Starter
    Frenzied Member sebs's Avatar
    Join Date
    Sep 2000
    Location
    Aylmer,Qc
    Posts
    1,606
    tx

    tmp() = StrConv(xmlContent, vbFromUnicode)
    Put #freeF, , tmp()


    solved it

Posting Permissions

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



Click Here to Expand Forum to Full Width