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
Wrong procedure parameters
Re: Wrong procedure parameters
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.
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
Yes I work with devart edml file.
Re: Wrong procedure parameters
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?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)
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
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.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.
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.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?
Re: Wrong procedure parameters
New build of dotConnect for Oracle 7.7.267 is available for download now!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.
Re: Wrong procedure parameters
Seems to be working now. Thanks.Shalex wrote:New build of dotConnect for Oracle 7.7.267 is available for download now!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.