Skip to content
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: Insert into table with Guid fails #568

Closed
tommarien opened this issue Jan 7, 2015 · 0 comments
Closed

Oracle: Insert into table with Guid fails #568

tommarien opened this issue Jan 7, 2015 · 0 comments

Comments

@tommarien
Copy link
Contributor

var id= Guid.NewGuid();

        Insert.IntoTable("SOMETHING")
              .Row(new Dictionary<string, object>()
              {
                  {"ID", id}
              }

Gives ORA-01465: invalid hex number

We should formatguid as

HEXTORAW (SUBSTR ('{0}', 6, 2) || SUBSTR ('{0}', 4, 2) || SUBSTR ('{0}', 2, 2) || SUBSTR ('{0}', 0, 2) || SUBSTR ('{0}', 10, 2) || SUBSTR ('{0}', 8, 2) || SUBSTR ('{0}', 14, 2) || SUBSTR ('{0}', 12, 2) || SUBSTR ('{0}', 16, 16))

With the guid ToString("N")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant