How to bind BLOB parameter of a stored procedure using Parameter Object of ADO

How to bind BLOB parameter of a stored procedure using Parameter Object of ADO

Post by Jimm » Sat, 24 May 2003 04:25:32



Hi All,

I use oraoledb.oracle OLEDB Provider to acccess Stored
procedure of Oracle 8.1.6 DBMS via MS ADO API.

I use Parameter Object which bind to parameters of Oracle
stored procedures. For noraml data type, such as ingeger,
VARCHAR2, etc., is OK. But for BLOB type as IN or OUT
parameter of stored procedure, always got following error:

Code = 80040e14
Meaning = IDispatch error #3092
Source = OraOLEDB
Description = ORA-06550: line 1, column 7:
PLS-00306: wrong number or types of arguments in call
to 'HK_BLOBINPUTTEST'
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored
]

pParam = pCmd->CreateParameter("", adVarBinary,
adParamInput, nSizeBinary, vParameter);

Above Parameter object is created and append to Parameters
collections.

vParameter is a variant, which value come from a stream
object.

Anybody have these knowledge or experiance, could you send
it to me? I am very appreciate it.

I tested BLOB type through using SELECT/UPDATE statement
directly via
Parameter object of MS ADO( oraOLEDB.oracle ), it WORKS,
No problem.

Only through stored procedures cause above error. By the
way, when I invoked the Oracle stored procedure, following
Call format was used:

{ CALL TRS_HK_PK.HK_BLOBINPUTTEST ( ?,?,? ) }

Should the stored procedure of Oracle or related OLEDB
provider has
some limitation on this matter?

Thanks,

Jimmy