Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2003-12-03
4
Medium Priority
?
889 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
2 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

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

Question has a verified solution.

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

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 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…
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
Is your OST file inaccessible, Need to transfer OST file from one computer to another? Want to convert OST file to PST? If the answer to any of the above question is yes, then look no further. With the help of Stellar OST to PST Converter, you can e…

773 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