My favorites | Sign in
Project Home Source
New issue   Search
  Advanced search   Search tips   Subscriptions
Issue 2955: BIT columns get wrong True/False literals in grid updates
2 people starred this issue and may be notified of changes. Back to list
Status:  Fixed
Owner:  ----
Closed:  Feb 2013

Sign in to add a comment
Reported by, Sep 6, 2012
When using HeidSQL to connect to a MS SQL server all SQL statements concerning logical fields (true/false) need to be quoted:

SELECT * FROM table WHERE logical_field = 'False';

otherwise you will get an error "Invalid column name 'False'"

Version used?
HeidiSQL revision: Must be the latest build for reporting issues. If not,
the report will be ignored!
MySQL Server version:
Operating system:

Sep 6, 2012
Project Member #1
"Invalid column name"... that's surel a server error message, not from HeidiSQL. How can that be an issue in HeidiSQL?
Status: Invalid
Sep 7, 2012
Bcause HeideSQL creates the wrong statement. The server just tells you that True or False is wrong. You will have to send 'True' or 'False'. If you don't pass the quotes to the server he of cause understand this as a field name.
Sep 7, 2012
Project Member #3
Are we talking about the "Data" tab? You wrote "SQL statements.." which made me think you mean some user fired query.
Sep 9, 2012
Correct. The issue occurs f you change values in the data tab. In fact my table did not have a primary index so HeidiSQL created a SQL statement with "where field_a = 1 and field_b = "teststring" and field_c = "" and field_d = False. So you should quote true/false for the update part and the where-criteria as well.
Sep 13, 2012
Project Member #5
(No comment was entered for this change.)
Status: Accepted
Labels: Severity-Broken MSSQL
Sep 17, 2012
Project Member #6
 Issue 2967  has been merged into this issue.
Sep 29, 2012
Project Member #7
I just wanted to fix that. But it seems Heidi lacks the data type for such logical columns. How is that data type named, and where can I find some technical documentation on it?
Status: NeedInfo
Sep 29, 2012
Project Member #8
According to various websites, e.g. , there is no such logical field, only BIT fields but these don't except true/false values, only numbers, 0 and 1.
Sep 30, 2012
That a matter of fact, but HeidiSQL shows these values (0/1) as True/False. So you have to transform True/False back to 0/1 before saving the values.
Sep 30, 2012
Project Member #10
What's the data type of those fields? Is it BIT?
Oct 1, 2012
Data type is "bit"
Oct 1, 2012
Project Member #12
(No comment was entered for this change.)
Summary: BIT columns get wrong True/False literals in grid updates
Status: Accepted
Nov 26, 2012
Hallo! Please, fix this bug. this is very useful feature, which makes your application very cool :) Thank you.
Feb 24, 2013
Project Member #14
This issue was closed by revision r4343.
Status: Fixed
Feb 24, 2013
Project Member #15
Should work in r4343.
Sign in to add a comment

Powered by Google Project Hosting