-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Oracle RAW column to Guid C#: Invalid Cast Exception #637
Comments
What is the exact error message? I'm hoping it gives a hint as to the data On 3 November 2016 at 09:10, Rojiferio [email protected] wrote:
Regards, Marc |
Thanks for response, the error doesn't give me too much information: Message: "Specified cast is not valid" The column is defined as RAW in Oracle, and I want to load in a Guid property. If I get the info using EF works.... Thanks again! |
Can you show me the code that you're using there? Because in many cases, the library injects a lot more context. I'm curious as to why that's being bypassed... |
And the query should returs that info: (Data columns defined as RAW (16)) |
K, I'll see what I can do. There's a slight complication, because .NET Here's an illustration:
|
That is not .NET-specific, is it? That is just native Microsoft GUID format, differing in the endianness of the first three pieces from the RFC 4122 format, AFAICT. |
Why method GetGuid is not suported in OracleDataReader Class????? http://docs.oracle.com/cd/E51173_01/win.122/e17732/OracleDataReaderClass.htm#ODPNT1185 ¿is this the problem? |
Error parsing column 0 (Id=System.Byte[] - Object) en Dapper.SqlMapper.ThrowDataException(Exception ex, Int32 index, IDataReader reader, Object value) I'm so deseperated... |
I hope to look at this tomorrow. |
I saw your post and was interested. It looks like the answer is that the first 3 sets of the guid are integer types which are independently subject to big endian formatting. The remaining sets of the guid are a byte array and are not subject to endian formatting. |
I'm have built and uploaded 1.50.3-beta1 that tries to address this. Is there any chance you could try it and let me know if it works? |
Thanks! I expect to can ckeck your release this week , I solved my issue implmenting a custom TypeHandler for Guid:
With this code I can read data without problem. I'll answer you as soon as possible. Thank you again! |
@Rojiferio just looking to close this out if we're all good here - can you please let us know when you get a chance? Thanks! |
I need to revert
91725fb;
the upshot if this is that there is no reliable cross-provider mechanism
that works well for this.
…On 3 Dec 2016 12:36 p.m., "Nick Craver" ***@***.***> wrote:
@Rojiferio <https://github.com/Rojiferio> just looking to close this out
*if* we're all good here - can you please let us know when you get a
chance? Thanks!
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#637 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AABDsNoYwMUQimLuRSateLPg22N6msL8ks5rEWJAgaJpZM4KoIEs>
.
|
Reverted; sorry, closing this down since we can't support it natively in the lib due to the incompatibility between backends |
Hi,
I'm trying to get Guid columns from Oracle Database (RAW: Generated by Entity Framework code first), and is thrown an exception. Is there some method to achieve it?
Thank you!
The text was updated successfully, but these errors were encountered: