Bug #1074 MyODBC 2.50.39 works OK but any other release has a bug
Submitted: 18 Aug 2003 6:16 Modified: 6 Oct 2003 1:17
Reporter: Denis Kolman Email Updates:
Status: Closed Impact on me:
None 
Category:Connector / ODBC Severity:S2 (Serious)
Version:3.51 -all releases OS:Microsoft Windows (Win 2000 Pro)
Assigned to: Bugs System CPU Architecture:Any

[18 Aug 2003 6:16] Denis Kolman
Description:
I use Delphi 6 SP2 and BDE to connect to MYSQL. 

When I try to insert into a table that has datetime fields trough TQuery.ExecSQL (eg. sql is 'insert into x (x_datetime) values (:s_datetime)' and s_datetime is ftDateTime ) application raises EBDEError 'Operation not applicable') when I use MyODBC 3.51.x but works fine with 2.50.39.

   

How to repeat:
Create table a with a_datetime datetime field.
Open a delphi project and put a TQuery component on the form. Set the DatabaseName property to MySQLbase351 (You must first define one in ODBC manager trough MYODBC 3.51.x driver). Put a 'insert into a (a_datetime) values (:a_datetime)' into SQL property. 
Set the a_datetime params property DateType to ftDateTime and default value to '12.01.2003 23:43:21'.

Put a button on a form and write 'Query.ExecSQL;' in his OnClick event handler.
 
Run the application.
(Error: 'Operation not applicable!').

With MyODBC 2.50.39 everything works fine.

Suggested fix:
I suggest you look at the 2.50.39 MyODBC source for the solution since it works fine.
[19 Aug 2003 4:23] Denis Kolman
ODBC trace of working 2.50.39

Attachment: mySQL250.LOG (application/octet-stream, text), 5.12 KiB.

[19 Aug 2003 4:24] Denis Kolman
ODBC trace of non-working 3.51.06

Attachment: mysql35106.log (application/octet-stream, text), 1.46 KiB.

[21 Sep 2003 22:22] Miguel Solorzano
The same issue already was reported: bug: #1026.
It is in process changes on MyODBC-3.51 bk tree. I will
test your case with a new dll when that code will released.
So please follow up the bug # above mentioned.
[3 Sep 2004 17:10] Andres Sanchez
Hi!. I have the same bug with MyODBC connector when I was trying insert datetime query param to MySQL database from my delphi 6 app. I was replace connector with an older version (2.50.39 MyODBC) like is suggested in Denis Kolman's comments. Indeed this bug is solved in this version but my application becomes very slow, and when I try to load any table from other application like Delphi' s SQL Explorer,  the same thing is happening.

Anyone can help me ?

Thanks.