c# - Inserting OracleType.Blob produces error 'wrong number or types of arguments in call to' -
i'm @ loss why i'm getting error
pls-00306: wrong number or types of arguments in phone call 'x' ora-06550: line 1, column 7:
i calling function code
class="lang-cs prettyprint-override">sql = "begin :retval := mypackage.myfunction('901','text.pdf', null,:p_filecontentid); end;"; oraclecommand command = new oraclecommand(sql, conn); command.commandtimeout = 30; oracleparameter returnvalue = new oracleparameter(":retval", oracledbtype.decimal); oracleparameter p_filecontentid = new oracleparameter(":p_filecontent_id", oracledbtype.decimal); p_filecontentid.direction = parameterdirection.output; returnvalue.direction = parameterdirection.returnvalue; command.parameters.add(returnvalue); command.parameters.add(p_filecontentid);
and run etc executenonquery();
the actual function looks this
function myfunction(filetype in user.ftype.filetype%type, filename in user.fobject.filename%type, content in user.fontent.content%type, filecontent_id out integer)
i know content blob. when run query above setting content null, works.
as set param :p_content ,
class="lang-cs prettyprint-override">command.parameters.add(new oracleparameter(":p_content", oracledbtype.blob, docimage.length)).value = docimage;
it gives me error above. have no thought why. i've run other similar queries before blobs no issue. one. have idea??
c# oracle parameters
No comments:
Post a Comment