My favorites | Sign in
Project Home Source
New issue   Search
for
  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 andreas....@gmail.com, 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? 7.0.0.4189
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 a...@anse.de
"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
#2 andreas....@gmail.com
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 a...@anse.de
Are we talking about the "Data" tab? You wrote "SQL statements.." which made me think you mean some user fired query.
Sep 9, 2012
#4 andreas....@gmail.com
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 a...@anse.de
(No comment was entered for this change.)
Status: Accepted
Labels: Severity-Broken MSSQL
Sep 17, 2012
Project Member #6 a...@anse.de
 Issue 2967  has been merged into this issue.
Sep 29, 2012
Project Member #7 a...@anse.de
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 a...@anse.de
According to various websites, e.g. http://stackoverflow.com/questions/7170688/sql-server-boolean-literal , 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
#9 andreas....@gmail.com
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 a...@anse.de
What's the data type of those fields? Is it BIT?
Oct 1, 2012
#11 andreas....@gmail.com
Data type is "bit"
Oct 1, 2012
Project Member #12 a...@anse.de
(No comment was entered for this change.)
Summary: BIT columns get wrong True/False literals in grid updates
Status: Accepted
Nov 26, 2012
#13 Alexande...@gmail.com
Hallo! Please, fix this bug. this is very useful feature, which makes your application very cool :) Thank you.
Feb 24, 2013
Project Member #14 a...@anse.de
This issue was closed by revision r4343.
Status: Fixed
Feb 24, 2013
Project Member #15 a...@anse.de
Should work in r4343.
Sign in to add a comment

Powered by Google Project Hosting