Wrong procedure parameters

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for Oracle
Post Reply
McMlok
Posts: 26
Joined: Tue 04 Jun 2013 13:01

Wrong procedure parameters

Post by McMlok » Tue 04 Jun 2013 13:17

Hello,

I have problem with importing stored procedures from Oracle. I have this table

CREATE TABLE "ETR_ADMIN"."PRODUCT_GROUP"
( "PRODUCT_GROUP_ID" NUMBER(9,0) NOT NULL ENABLE,
"PRODUCT_GROUP_NAME" VARCHAR2(10 CHAR) NOT NULL ENABLE, ......)

and stored procedure

PROCEDURE InsProductGroup
(
a_product_group_id OUT product_group.product_group_id%TYPE,
a_product_group_name IN product_group.product_group_name%TYPE
);

When I import table everything is corect and datatypes of columns in table is Number and varchar2. But When I import stored procedure parameter a_product_group_id has datatype double and parameter a_product_group_name has datatype VARCHAR2(40)

Doe anybody know what I'm doing wrong?

Thanks

Oracle 11.2.0.3.0
dotConnect 7.6.220

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Re: Wrong procedure parameters

Post by Shalex » Thu 06 Jun 2013 16:57

You are working Devart Entity Model (*.edml), aren't you?

We have reproduced the following behaviour with the latest (7.7.257) build of dotConnect for Oracle: parameters of your stored procedure are imported in the store part (SSDL) of the model without precision and length facets. As a result, the a_product_group_id parameter type becomes decimal in both SSDL and CSDL parts. We will investigate the issue and post here about the result.

McMlok
Posts: 26
Joined: Tue 04 Jun 2013 13:01

Re: Wrong procedure parameters

Post by McMlok » Fri 07 Jun 2013 10:51

Yes I work with devart edml file.

HSNMatt
Posts: 18
Joined: Thu 18 Apr 2013 15:30
Location: St Petersburg, FL

Re: Wrong procedure parameters

Post by HSNMatt » Mon 10 Jun 2013 15:51

When I import table everything is corect and datatypes of columns in table is Number and varchar2. But When I import stored procedure parameter a_product_group_id has datatype double and parameter a_product_group_name has datatype VARCHAR2(40)
I have noticed this issue as well. Even more than that, a lot of the time Devart will import a NUMBER(1) as a boolean instead of an int32. In addition, I will import a stored procedure one time and stuff will be decimal? types and the next time it'll be as double? types. Is this due to the precision of the column on Oracle?

McMlok: what you can do is go into the complex object and manually change the data types. I'm actually using something called AutoMapper, and in there I can create data mappings (for example, how to map a string to a boolean). I created a decimal -> double and double -> decimal mapping so my decoupled model doesn't care about the complex type that dotconnect returns back. As far as passing those fields as parameters, I just do a Convert.ToDouble() or Convert.ToDecimal() in the stored procedure method call and things seem to work fine.

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Re: Wrong procedure parameters

Post by Shalex » Wed 12 Jun 2013 09:56

Shalex to McMlok wrote:parameters of your stored procedure are imported in the store part (SSDL) of the model without precision and length facets. As a result, the a_product_group_id parameter type becomes decimal in both SSDL and CSDL parts.
The bug with reading facets of a stored procedure parameter is fixed. We will post here when the corresponding build of dotConnect for Oracle is available for download.
HSNMatt wrote:a lot of the time Devart will import a NUMBER(1) as a boolean instead of an int32. In addition, I will import a stored procedure one time and stuff will be decimal? types and the next time it'll be as double? types. Is this due to the precision of the column on Oracle?
You can adjust mapping of the Database-First approach for the newly created *.edml models via Visual Studio > Tools > Entity Developer > Options> Servers Options > Oracle.

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Re: Wrong procedure parameters

Post by Shalex » Thu 20 Jun 2013 16:20

Shalex wrote:The bug with reading facets of a stored procedure parameter is fixed. We will post here when the corresponding build of dotConnect for Oracle is available for download.
New build of dotConnect for Oracle 7.7.267 is available for download now!

HSNMatt
Posts: 18
Joined: Thu 18 Apr 2013 15:30
Location: St Petersburg, FL

Re: Wrong procedure parameters

Post by HSNMatt » Fri 21 Jun 2013 14:42

Shalex wrote:
Shalex wrote:The bug with reading facets of a stored procedure parameter is fixed. We will post here when the corresponding build of dotConnect for Oracle is available for download.
New build of dotConnect for Oracle 7.7.267 is available for download now!
Seems to be working now. Thanks.

Post Reply