When I try to add a procedure with boolean parameters in the Entity Developer, the follow error is showed:
The parameter 'my_bool_par' has unsupported data type 'PL/SQL BOOLEAN'. Cannot Create method for function 'MY_PROCEDURE'
Boolean parameters is not allowed? Other option or workaround?
dotConnect version 5.70.140.0 over .Net 3.5.
Problem in add Oracle procedures with boolean parameters.
There is no direct support for PL/SQL Boolean type in Entity Framework.
Here is a workaround:
1. Add the procedure to the model using Entity Developer (use either Visual Studio Integration or standalone).
2. Change the type of the Boolean parameters to "bool" from "PL/SQL BOOLEAN".
3. Write a new Command Text for this procedure. Let it be a simple PL/SQL block that executes the procedure.
Please note that this command text should convert all NUMBER parameters to PL/SQL BOOLEAN using the SYS.DIUTIL.INT_TO_BOOL function.
You can perform the same steps with an .edmx model using XML Editor.
For example, you had the following definition:
and should obtain the following one:
Here is a workaround:
1. Add the procedure to the model using Entity Developer (use either Visual Studio Integration or standalone).
2. Change the type of the Boolean parameters to "bool" from "PL/SQL BOOLEAN".
3. Write a new Command Text for this procedure. Let it be a simple PL/SQL block that executes the procedure.
Please note that this command text should convert all NUMBER parameters to PL/SQL BOOLEAN using the SYS.DIUTIL.INT_TO_BOOL function.
You can perform the same steps with an .edmx model using XML Editor.
For example, you had the following definition:
Code: Select all
Code: Select all
BEGIN
EF_TEST_PKG.EF_INSERT(:P_PK, SYS.DIUTIL.INT_TO_BOOL(:P_FLAG));
END;