0

I am using MySQL 5.5 and i linked it with my ASP.net Application .

i added a dataset to link my application within the MySQL stored procedure !!!

the problem is when i call any stored procedure which contains BOOLEAN like this one :

CREATE DEFINER=`root`@`localhost` PROCEDURE `SpCatDetailsDML`(
    ParDetDescription TEXT,
    ParDetDescriptionAR TEXT,
    ParPrice INT,
    ParCreatedOn DATETIME,
    ParDisplayOrder INT,
    ParAllowDisplay BOOLEAN,
    ParPictureID BIGINT,
    ParShowTypeID BIGINT
)
BEGIN-- INSERT --
    INSERT INTO cms.tbcatdetails(CatID,CustomerID,DetTitle,DetTitleAR,ShoertDesc,ShoertDescAr,DetDescription,
                                 DetDescriptionAR,Price,CreatedOn,DisplayOrder,AllowDisplay,PictureID,ShowTypeID) 
    VALUES (ParCatID,ParCustomerID,ParDetTitle,ParDetTitleAR,ParShoertDesc,ParShoertDescAr,ParDetDescription,
            ParDetDescriptionAR,ParPrice,ParCreatedOn,ParDisplayOrder,ParAllowDisplay,ParPictureID,ParShowTypeID);
END

when i add this stored procedure to my dataset it will show me a warning becaues th ParAllowDisplay data type which is Boolean!!

so any suggestions???

HAJJAJ
  • 3,667
  • 14
  • 42
  • 70

1 Answers1

2

There is no Boolean data type in MySQL. Use TINYINT(1) instead.

See here http://dev.mysql.com/doc/refman/5.5/en/numeric-type-overview.html


weird, I see BOOL, BOOLEAN in the URL mentioned above. Never used them.

also, refer this post Which MySQL data type to use for storing boolean values

Community
  • 1
  • 1
Nishant
  • 54,584
  • 13
  • 112
  • 127
  • @ajreal So, can I use `BOOL` as a data type while creating table? I fail to remember that I have ever used `BOOL`, I always use `TINYINT(1)`. – Nishant Feb 01 '11 at 07:22
  • no you cant i already used BOOL and same problem with it !! anyway i think TINYINT(1) will solve this one. thank you – HAJJAJ Feb 01 '11 at 07:28
  • @ajreal, @HAJJAJ -- ah, great. Thanks. I was confused for a second. – Nishant Feb 01 '11 at 07:52