Page 1 of 1

Oracle vs Guid

Posted: Wed 11 May 2011 16:49
by luizao.fernando
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

Posted: Thu 12 May 2011 14:27
by Shalex
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.

Posted: Fri 13 May 2011 11:17
by luizao.fernando
Thank you very much for the explanation. I appreciate that.

Fernando Mello