Page 1 of 1
Wrong procedure parameters
Posted: Tue 04 Jun 2013 13:17
by McMlok
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
Re: Wrong procedure parameters
Posted: Thu 06 Jun 2013 16:57
by Shalex
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.
Re: Wrong procedure parameters
Posted: Fri 07 Jun 2013 10:51
by McMlok
Yes I work with devart edml file.
Re: Wrong procedure parameters
Posted: Mon 10 Jun 2013 15:51
by HSNMatt
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.
Re: Wrong procedure parameters
Posted: Wed 12 Jun 2013 09:56
by Shalex
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.
Re: Wrong procedure parameters
Posted: Thu 20 Jun 2013 16:20
by Shalex
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!
Re: Wrong procedure parameters
Posted: Fri 21 Jun 2013 14:42
by HSNMatt
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.