Oracle vs Guid

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for Oracle
Post Reply
luizao.fernando
Posts: 2
Joined: Wed 11 May 2011 14:56

Oracle vs Guid

Post by luizao.fernando » Wed 11 May 2011 16:49

Hello guys,

I tryed to find a topic related to this subject but I had no success.

When I execute a query on SQL Server on a UNIQUEIDENTIFIER field it returns a System.Guid type. I guess it is the provider that maps the value to the .Net Guid structure. right?

In Oracle case, a Raw(16) field returns a System.Byte[] type. My question is: the Devart Oracle provider maps to Guid automaticaly? Or do I have to map by myself? Or is there another way to mapping/cast it clear to the engine (return a Guid)?

Thanks in advance.

Fernando Mello

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

Post by Shalex » Thu 12 May 2011 14:27

luizao.fernando wrote:In Oracle case, a Raw(16) field returns a System.Byte[] type.
This is a designed behaviour.
luizao.fernando wrote:My question is: the Devart Oracle provider maps to Guid automaticaly?
No.
luizao.fernando wrote:Or do I have to map by myself?
There is no such possibility because connection level mapping is implemented only for the numeric data types.
luizao.fernando wrote:Or is there another way to mapping/cast it clear to the engine (return a Guid)?
1. You can retrieve Guid from database using OracleDataReader.GetGuid().
2. By default, RAW(16) in our Entity Framework and LinqConnect implementations is mapped to System.Guid.

luizao.fernando
Posts: 2
Joined: Wed 11 May 2011 14:56

Post by luizao.fernando » Fri 13 May 2011 11:17

Thank you very much for the explanation. I appreciate that.

Fernando Mello

Post Reply