Solved

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

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

I would like to start this tip/trick by saying Thank You, to all who said that this could not be done, as it forced me to make sure that it could be accomplished. :) To start, I want to make sure everyone understands the importance of utilizing p…
Have you ever needed to get an ASP script to wait for a while? I have, just to let something else happen. Or in my case, to allow other stuff to happen while I was murdering my MySQL database with an update. The Original Issue This was written…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, just open a new email message. In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…

912 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

23 Experts available now in Live!

Get 1:1 Help Now