Page 1 of 1

MySQL 5, the BIT datatype and TMyStoredProc

Posted: Wed 14 Dec 2005 09:09
by upscene
Hi there,

I cannot get the BIT datatype working with the MyStoredProc component and MySQL 5. I'm using the latest version of MyDAC.

Whenever I try to use AsBoolean for a parameter, I get an error like this:

>>>#22001Data too long for column 'b' at row 1.

Simple procedure source code and table:

Code: Select all

CREATE TABLE newtab (
  i  Integer,
  d  Date,
  dt DateTime,
  t  Time,
  b  Bit
)

CREATE PROCEDURE newtab_I(i Integer, dt DateTime, d Date, t Time, b Bit)
BEGIN
  INSERT INTO newtab (
    i, d, dt, t, b)
  VALUES (
    i, d, dt, t, b);

END
Isn't this supported yet?

--
Martijn Tonies
Upscene Productions

Posted: Wed 14 Dec 2005 09:11
by upscene
btw, I also get this message when the parameter datatype isn't set:

---------------------------
Project1
---------------------------
Unknown column type "BIT" in "i Integer, dt DateTime, d Date, t Time, b Bit"
---------------------------
OK
---------------------------

--
Martijn Tonies
Upscene Productions

Posted: Fri 16 Dec 2005 09:46
by Ikar
This problem will be fixed in nearest build.

Posted: Wed 21 Dec 2005 15:45
by upscene
I still get the "data too long" error when using AsBoolean with the new version.

Any ideas?

--
Martijn Tonies
Upscene Productions

Posted: Fri 23 Dec 2005 13:49
by Ikar
We couldn't reproduce the problem.
Please send us a complete small sample to demonstrate it.

Also supply us your exact version of Delphi.