Link to home
Start Free TrialLog in
Avatar of larrycolvin
larrycolvin

asked on

Inserting BLOB's via ADODB.Stream using a Stored Procedure in Oracle

I am using an ADODB.Stream object to transport a binary file to the web server from the client and trying to insert it into an Oracle database using a stored procedure. I have the parameter defined as CommandObject.CreateParameter("parBLOB", adLongVarBinary, adParamInput, stream.Size + 1). I am having trouble initializing the parameter from the stream object. I have tried using:
parameter.appendchunk array
parameter.value stream.read

Having no success. Does anyone know of a method to accomplish this task? Any help would be greatly appreciated.
Avatar of Jimby_Aus
Jimby_Aus
Flag of Australia image

Ive never tried it with oracle, only sql server, and not using a stored procedure.
Ive always created a recordset, defined and loaded the stream, and just read the stream into the field as follows:

stream.Type = adTypeBinary
stream.open
stream.loadfromfile "c:\temp\file.dat"

rs("blob") = Stream.Read.
rs.Update.

Sorry I cant help you further.

Jimby.
ASKER CERTIFIED SOLUTION
Avatar of larrycolvin
larrycolvin

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial