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

SimpleCrud works using oracle driver but not odbc #252

Open
wegoodwin opened this issue Oct 4, 2021 · 0 comments
Open

SimpleCrud works using oracle driver but not odbc #252

wegoodwin opened this issue Oct 4, 2021 · 0 comments

Comments

@wegoodwin
Copy link

If I use the oracle driver with simplecrud to do an insert everything works fine. If I use an ODBC connection for oracle to do an insert with simplecrud it scrambles the parameters. For example

public class testclass
        {
            [Key]
            public int keycolumn { get; set; }
            public string c1 { get; set; }
            public string c2{ get; set; }
            public string c3{ get; set; }
            public string c4{ get; set; }
        }

public static IDbConnection getDBConnection()
        {
            return new OdbcConnection("Dsn=OraDev;Uid=system;Pwd=password;");

        }

public static void OracleODBCTest()
        {

            Dapper.SimpleCRUD.SetDialect(Dapper.SimpleCRUD.Dialect.Oracle);
            testclass tc = new testclass();
            tc.c1= "a";
            tc.c2= "b";
            tc.c3= "c";
            tc.c4= "d";

            using (var connection = getDBConnection())
            {
                connection.Insert(tc);
            }


        }

When I look in the database :

c1 = "b"
c2 = "c"
c3 = "d"
c4 = "a"

It like it's moving everything over by one or something.

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

No branches or pull requests

1 participant