Showing Oracle BLOB field as Image in VB 
Author Message
 Showing Oracle BLOB field as Image in VB

One of my table contains a BLOB FIELD which stores
image data (gif image). This has to be displayed in VB form.
To access this i have created a store procedure at backend
which returns the output in long raw.
But this long raw cannot be access in vb.
I am assuming that VB receives
hex value in string. Pls can u guide me.
How do I convert the
value to store this into .gif file.

The file of size 476 stored in BLOB field is retrived as string
of size 1904 in hex. Storing as it is does not work out.

Stored Procedure:
create or replace procedure readlob( bdata OUT long RAW) AS
src_lob BLOB;
amt BINARY_INTEGER := 32767;
pos INTEGER := 1;
lrw long raw;
select gif_img into src_lob from imgs where id=1;
DBMS_LOB.READ (src_lob, amt,1, lrw);
bdata :=lrw;

vb code
Dim con As New ADODB.Connection
Dim com As New ADODB.Command
Dim buffer As Variant
Dim Fname As String
con.Provider = "msdaora"
con.Open , "scott", "tiger"
com.CommandType = adCmdStoredProc
com.CommandText = "readlob"
com.ActiveConnection = con
com.Parameters(0).Direction = adParamOutput
com.Parameters(0).type = adVariant
buffer = com.Parameters(1).Value
... ... ...

Sent via http://www.*-*-*.com/
Before you buy.

Wed, 18 Jun 1902 08:00:00 GMT  
 [ 1 post ] 

 Relevant Pages 

1. I need save a image in a blob field in DB2 UDB from

2. Bitmap not showing in Blob Field

3. memo/blob fields from access and/or oracle, access in VBScript under ASP

4. problem accessing BLOB fields in ORACLE

5. How to insert outlook email message into BLOB field in Oracle DB

6. Use ADO to Access BLOB or CLOB fields in Oracle

7. Oracle 8i BLOBS fields via ADO

8. Use ADO to Access BLOB or CLOB fields in Oracle

9. BLOB or Image Fields

10. How to view images in a report fro a mysql blob field

11. Help with passing an SQL Server Image field (BLOB) to a DLL

12. Truncated images from SQL BLOB field


Powered by phpBB® Forum Software