Problem in add Oracle procedures with boolean parameters.

Discussion of open issues, suggestions and bugs regarding Entity Framework support in ADO.NET Data providers
Post Reply
Posts: 1
Joined: Mon 19 Jul 2010 21:35

Problem in add Oracle procedures with boolean parameters.

Post by edinardo » Mon 19 Jul 2010 21:47

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 over .Net 3.5.

Devart Team
Posts: 2919
Joined: Mon 07 Jul 2008 13:16

Post by AndreyR » Wed 21 Jul 2010 12:12

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:

Code: Select all

and should obtain the following one:

Code: Select all



Post Reply