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

string with only number is transform to int #29

Closed
AlainDessi opened this issue Nov 12, 2017 · 2 comments
Closed

string with only number is transform to int #29

AlainDessi opened this issue Nov 12, 2017 · 2 comments

Comments

@AlainDessi
Copy link

If I do

.Update(
new[] { "myColumn" },
new object[] { "090" }
);

after compile I get
UPDATE my_table SET myColumn = 090

is a problem for me.
In my case, MyColumn is a Char(3)

@ahmad-moussawi
Copy link
Contributor

Actually the .ToString() method tries it's best to guess the params type, in order to just display them form debugging purposes, so you should not use it to execute your queries, you should use the .Sql property instead.

so your queries will get executed correctly regardless of how they get displayed.

@AlainDessi
Copy link
Author

Thanks,
Compile.Sql and Binding work's fine ...

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

3 participants