|
-
May 28th, 2001, 04:30 AM
#1
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>
-
May 28th, 2001, 06:28 AM
#2
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|