Menu

#2955 BIT columns get wrong True/False literals in grid updates

Fixed
nobody
MSSQL (46)
Broken
Defect
2013-02-24
2012-09-06
Anonymous
No

Originally created by: andreas....@gmail.com

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:

Related

Tickets: #2967

Discussion

  • Anonymous

    Anonymous - 2012-09-06

    Originally posted by: 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

     
  • Anonymous

    Anonymous - 2012-09-07

    Originally posted by: 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.

     
  • Anonymous

    Anonymous - 2012-09-07

    Originally posted by: a...@anse.de

    Are we talking about the "Data" tab? You wrote "SQL statements.." which made me think you mean some user fired query.

     
  • Anonymous

    Anonymous - 2012-09-09

    Originally posted by: 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.

     
  • Anonymous

    Anonymous - 2012-09-13

    Originally posted by: a...@anse.de

    (No comment was entered for this change.)

    Labels: Severity-Broken MSSQL
    Status: Accepted

     
  • Anonymous

    Anonymous - 2012-09-29

    Originally posted by: 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

     
  • Anonymous

    Anonymous - 2012-09-29

    Originally posted by: 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.

     
  • Anonymous

    Anonymous - 2012-09-30

    Originally posted by: 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.

     
  • Anonymous

    Anonymous - 2012-09-30

    Originally posted by: a...@anse.de

    What's the data type of those fields? Is it BIT?

     
  • Anonymous

    Anonymous - 2012-10-01

    Originally posted by: a...@anse.de

    (No comment was entered for this change.)

    Summary: BIT columns get wrong True/False literals in grid updates
    Status: Accepted

     
  • Anonymous

    Anonymous - 2012-11-26

    Originally posted by: Alexande...@gmail.com

    Hallo! Please, fix this bug. this is very useful feature, which makes your application very cool :) Thank you.