CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: Image storing

  1. #1
    Join Date
    May 2001
    Location
    Hyderabad,Anadrapradesh,India.
    Posts
    3

    Image storing

    hai,
    can any body help me?i want to write an image into oracle database and want to retrive back.i know that i should use BLOB data type but i don't know how to writwe the image into the column
    please help me..
    seshu

    <font color=blue>Seshu</font>

  2. #2
    Join Date
    Apr 2001
    Posts
    9

    Re: Image storing

    Hi,

    try to implement this code

    Open Filename for binary as #1
    RS.Addnew
    RS.Fields(Fieldname).Value = InputB(LOF(#1), #1)
    RS.Update
    close #1



    (you'll have to open the recordset etc... "Filename" and "Fieldname" are variables ;-) )

    when you'll like to get the image out of the oracle-db you'll have to select the recordset and save the data like this:

    Put #1, , RS.Fields(Fieldname).Value



    but be patient: 'cause of it's variable length vb puts 12 bytes with the length as information before the original data. I don't have a very good solution for this, only "copying" this file to a new file (starting at byte 13).

    Bye,
    O.K




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

Featured