Solved

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

Posted on 2003-12-03
4
866 Views
Last Modified: 2012-05-04
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.
0
Comment
Question by:larrycolvin
4 Comments
 
LVL 1

Expert Comment

by:Jimby_Aus
ID: 9871487
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.
0
 

Accepted Solution

by:
larrycolvin earned 0 total points
ID: 9876317
I figured it out. There is a connection property that need's to be set that is specific to OraOLEDB.       
objCmd.Properties("SPPrmsLOB") = TRUE

Must be set to True before execution and False after execution. This lets the provider know that a LOB parameter is used in the procedure.
0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Suggested Solutions

I recently decide that I needed a way to make my pages scream on the net.   While searching around how I can accomplish this I stumbled across a great article that stated "minimize the server requests." I got to thinking, hey, I use more than one…
I was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference: Let's make the introductions... Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interact…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now