The Type number is not qualified with a namespace or alias.

The Type number is not qualified with a namespace or alias.

Postby anand123 » Tue 11 Feb 2014 07:56

I am working on DevArt Oracle Connect PoC for our existing application. Our application suppose to work in sql and oracle using EF. So we have two sets of (SSDL, CSDL, MSL) for oracle and sql. Now I am trying to use same oracle specific files with DevArt. Getting below error. we have few config settings for datatype mapping for Oracle.

Queries
1. Is there any such settings for DevArt.?

2. Is there any simple way in DevArt like just use the same sql files (csdl, msl, ssdl) for devArt with some configiration. what is the best approach you suggest.


Error Info

Error: VMOracle.ssdl(464,6) : error 0040: The Type number is not qualified with a namespace or alias. Only primitive types can be used without qualification.

edmx generated using devArtProvider
<Property Name="VOYAGE" Type="decimal" Precision="29" Scale="0" />

working tag with Oracle Client EF 4.0
<Property Name="VOYAGE" Type="number" Precision="10" />

Configuration
<oracle.dataaccess.client>
<settings>
<add name="bool" value="edmmapping number(1,0)"/>
<add name="byte" value="edmmapping number(3,0)"/>
<add name="int16" value="edmmapping number(5,0)"/>
<add name="int32" value="edmmapping number(10,0)"/>
<add name="int64" value="edmmapping number(19,0)"/>
<add name="int16" value="edmmapping number(38,0)"/>
<add name="int32" value="edmmapping number(38,0)"/>
<add name="int64" value="edmmapping number(38,0)"/>
</settings>
</oracle.dataaccess.client>
anand123
 
Posts: 17
Joined: Thu 30 Jan 2014 08:58

Re: The Type number is not qualified with a namespace or alias.

Postby Shalex » Thu 13 Feb 2014 09:20

anand123 wrote:1. Is there any such settings for DevArt.?

Here is a default mapping: http://www.devart.com/dotconnect/oracle/docs/?DataTypeMapping.html.

If necessary, you can change default mapping:
1) via the Tools > Options > Servers' Options > Oracle menu (applied only for Entity Developer, *.edml)
2) using the Number Mappings connection string parameter (applied only for EDM Wizard, *.edmx)

anand123 wrote:2. Is there any simple way in DevArt like just use the same sql files (csdl, msl, ssdl) for devArt with some configiration. what is the best approach you suggest.

Usage of SQL Server and Oracle simultaneously in one application can be implemented in the following alternative ways:

1. Creating repositories for 2 models

2. Using mapping which is loaded dynamically:
2.1. With 2 *.edmx (or 2 *.edml). Only one of them generates the code of model and entity classes, another one is used as a source of XML resources (example: http://www.devart.com/efquerysamples.zip)
2.2. Only one model and database independent fluent mapping: http://blog.devart.com/entity-developer-ef-code-first-dbcontext-template.html

3. Code-First approach: http://blogs.devart.com/dotconnect/entity-framework-code-first-support-for-oracle-mysql-postgresql-and-sqlite.html. This article includes reference to the sample "Code-First for All Databases" which shows the way how to access different databases with the same code.
Despite the approach you will choose, we recommend you to employ Devart Entity Model (*.edml): http://www.devart.com/entitydeveloper/ed-vs-edm.html.

More tips: http://blog.devart.com/using-oracle-and-ms-sql-server-in-entity-framework-applications-simultaneously.html.

If this doesn't help, please specify your call stack when "Error: VMOracle.ssdl(464,6) : error 0040: The Type number is not qualified with a namespace or alias." arises.
Shalex
Devart Team
 
Posts: 7839
Joined: Thu 14 Aug 2008 12:44

Re: The Type number is not qualified with a namespace or alias.

Postby anand123 » Mon 17 Feb 2014 12:29

thanks for the input.

solved using second approach. code first also is better option, we will check with that.

thanks
anand
anand123
 
Posts: 17
Joined: Thu 30 Jan 2014 08:58


Return to dotConnect for Oracle