Solved

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

Posted on 2003-12-03
4
876 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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Hello, all! I just recently started using Microsoft's IIS 7.5 within Windows 7, as I just downloaded and installed the 90 day trial of Windows 7. (Got to love Microsoft for allowing 90 days) The main reason for downloading and testing Windows 7 is t…
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…

820 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