-
-
Notifications
You must be signed in to change notification settings - Fork 496
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
[SQLServer] insert bool value #437
Comments
@stefaniaolivares have you tried to execute this directly in the Database? |
Yes I tried but the query not working, maybe I'm doing something wrong. |
Your .ToString() seem to be converting the the object and not the contents of it. Insert does work, you need to make sure that each value is either a string or 0/1 tested the insert with this code.
|
Hi! I'm having trouble with inserting bool values in sql server. The compiler translate bool with true or false instead of 1 or 0. How can I solve this issue?
var query = new Query(Table).AsInsert(model); var sql = SqlServerCompiler().Compile(query).ToString();
The value of the sql variable is
INSERT INTO [Table] ([IsRunning], [IsEnabled]) VALUES (false, true)
Thanks!!
The text was updated successfully, but these errors were encountered: