ORA-06550: line 1, column 7: PLS-00306: wrong number or types of arguments in call to 'UPDATEPHOTO'
ORA-06550: line 1, column 7: PL/SQL: Statement ignoredOracle.ManagedDataAccess.Client.OracleException
I don't know what is wrong either with procedure or my code.
Here's my stored procedure
create or replace
PROCEDURE UpdatePhoto
(
v_ac_photo_fileName IN VARCHAR2 DEFAULT NULL ,
v_ac_photo_contentType IN VARCHAR2 DEFAULT NULL ,
v_ac_photo_Data IN BLOB DEFAULT NULL ,
v_ac_uniqueID IN VARCHAR2 DEFAULT NULL
)
AS
BEGIN
UPDATE account_table
SET ac_photo_fileName = v_ac_photo_fileName,
ac_photo_contentType = v_ac_photo_contentType,
ac_photo_Data = v_ac_photo_Data
WHERE ac_uniqueID = v_ac_uniqueID;
END;
Here's my C# code:
public int UpdatePhoto(BO nBo)
{
OracleConnection ocon = new OracleConnection(orastr);
OracleCommand ocmd = new OracleCommand("UpdatePhoto", ocon);
ocmd.CommandType = CommandType.StoredProcedure;
ocon.Open();
try
{
ocmd.Parameters.Add("ac_uniqueID", nBo.account_uniqueID);//String
ocmd.Parameters.Add("ac_photo_fileName", nBo.account_photo_fileName);//string
ocmd.Parameters.Add("ac_photo_contentType", nBo.account_photo_contentType);//string
ocmd.Parameters.Add("ac_photo_Data", nBo.account_photo_Data);// (Byte[] photo data)
// tried these also
ocmd.Parameters.Add("ac_uniqueID", OracleDbType.Varchar2, ParameterDirection.Input).Value = nBo.account_uniqueID;
ocmd.Parameters.Add("ac_photo_fileName", OracleDbType.Varchar2, ParameterDirection.Input).Value = nBo.account_photo_fileName;
ocmd.Parameters.Add("ac_photo_contentType", OracleDbType.Varchar2, ParameterDirection.Input).Value = nBo.account_photo_contentType;
ocmd.Parameters.Add("ac_photo_Data", OracleDbType.Blob, ParameterDirection.Input).Value = nBo.account_photo_Data;
return ocmd.ExecuteNonQuery();
}
catch (Exception ex)
{
throw ex;
}
finally
{
ocon.Dispose();
ocon.Close();
nBo = null;
}
}