Using boolean DbType in OracleCommand
Posted: Tue 30 Sep 2008 12:02
Hi,
I am trying to execute a stored procedure using an OracleCommand, the stored procedure is as follows:
create or replace
PROCEDURE "INSERT_CUSTOMTABLEMETADATA"
(
"TABLENAME" IN VARCHAR2,
"TABLETYPE" IN VARCHAR2,
"COLUMNNAME" IN VARCHAR2,
"SEQUENCE" IN NUMBER,
"SYSTEMCOLUMN" IN NUMBER,
"DATATYPE" IN VARCHAR2,
"REQUIRED" IN NUMBER,
"PARAMETER1" IN VARCHAR2,
"PARAMETER2" IN VARCHAR2,
"PARAMETER3" IN VARCHAR2,
"PARAMETER4" IN VARCHAR2,
"PARAMETER5" IN VARCHAR2,
"SELECTIONTYPE" IN VARCHAR2,
"ID" OUT NUMBER
) AS
BEGIN
INSERT INTO "CUSTOMTABLEMETADATA"(
"TABLENAME",
"TABLETYPE",
"COLUMNNAME",
"SEQUENCE",
"SYSTEMCOLUMN",
"DATATYPE",
"REQUIRED",
"PARAMETER1",
"PARAMETER2",
"PARAMETER3",
"PARAMETER4",
"PARAMETER5",
"SELECTIONTYPE"
) VALUES
(
"TABLENAME",
"TABLETYPE",
"COLUMNNAME",
"SEQUENCE",
"SYSTEMCOLUMN",
"DATATYPE",
"REQUIRED",
"PARAMETER1",
"PARAMETER2",
"PARAMETER3",
"PARAMETER4",
"PARAMETER5",
"SELECTIONTYPE"
) RETURNING ID INTO "ID";
END;
The REQUIRED column is of type Number(1,0).
I create an OracleCommand to call this procedure for the "REQUIRED" parameter I set it as a boolean DBType with a boolean value. Then on executing the command I get the following error:
PLS-00306: wrong number or types of arguments in call to 'INSERT_CUSTOMTABLEMETADATA'
I have tried to use the ParameterCheck option and this results in the same error.
Is there no automatic conversion of boolean dbtypes to their correct database equivalent.
Any help regarding this issue would be much appreciated.
I am trying to execute a stored procedure using an OracleCommand, the stored procedure is as follows:
create or replace
PROCEDURE "INSERT_CUSTOMTABLEMETADATA"
(
"TABLENAME" IN VARCHAR2,
"TABLETYPE" IN VARCHAR2,
"COLUMNNAME" IN VARCHAR2,
"SEQUENCE" IN NUMBER,
"SYSTEMCOLUMN" IN NUMBER,
"DATATYPE" IN VARCHAR2,
"REQUIRED" IN NUMBER,
"PARAMETER1" IN VARCHAR2,
"PARAMETER2" IN VARCHAR2,
"PARAMETER3" IN VARCHAR2,
"PARAMETER4" IN VARCHAR2,
"PARAMETER5" IN VARCHAR2,
"SELECTIONTYPE" IN VARCHAR2,
"ID" OUT NUMBER
) AS
BEGIN
INSERT INTO "CUSTOMTABLEMETADATA"(
"TABLENAME",
"TABLETYPE",
"COLUMNNAME",
"SEQUENCE",
"SYSTEMCOLUMN",
"DATATYPE",
"REQUIRED",
"PARAMETER1",
"PARAMETER2",
"PARAMETER3",
"PARAMETER4",
"PARAMETER5",
"SELECTIONTYPE"
) VALUES
(
"TABLENAME",
"TABLETYPE",
"COLUMNNAME",
"SEQUENCE",
"SYSTEMCOLUMN",
"DATATYPE",
"REQUIRED",
"PARAMETER1",
"PARAMETER2",
"PARAMETER3",
"PARAMETER4",
"PARAMETER5",
"SELECTIONTYPE"
) RETURNING ID INTO "ID";
END;
The REQUIRED column is of type Number(1,0).
I create an OracleCommand to call this procedure for the "REQUIRED" parameter I set it as a boolean DBType with a boolean value. Then on executing the command I get the following error:
PLS-00306: wrong number or types of arguments in call to 'INSERT_CUSTOMTABLEMETADATA'
I have tried to use the ParameterCheck option and this results in the same error.
Is there no automatic conversion of boolean dbtypes to their correct database equivalent.
Any help regarding this issue would be much appreciated.