I use Delphi 5 Enterprise. MyDAC 4.30.1.15. MySQL 4.0.26 Commercial version.
If I store a TDateTime number -1/24. a negativ hour. That is not what I get back when I read it. The number in MySQL is correct but what MyDAC gives me is incorrect.
I have made a small exsample aswell:
Drop a TMyConnection, TMyQuery, TMemo and a TButton on a form.
Code: Select all
unit Main;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls, Db, MemDS, DBAccess, MyAccess;
type
TForm1 = class(TForm)
MyConnection1: TMyConnection;
MyQuery1: TMyQuery;
Memo1: TMemo;
Button1: TButton;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.DFM}
procedure TForm1.Button1Click(Sender: TObject);
begin
MyQuery1.SQL.Text := 'DROP TABLE IF EXISTS errorindouble';
MyQuery1.Execute;
MyQuery1.SQL.Text := 'CREATE TABLE IF NOT EXISTS errorindouble (id INT NOT NULL, DTTime double NOT NULL)';
MyQuery1.Execute;
MyQuery1.SQL.Text := 'SELECT * FROM errorindouble';
MyQuery1.Execute;
MyQuery1.Insert;
MyQuery1['id'] := 1;
MyQuery1['DTTime'] := -1/24;
Memo1.Lines.Append(FloatToStr(MyQuery1['DTTime']));
MyQuery1.Post;
MyQuery1.SQL.Text := 'SELECT * FROM errorindouble WHERE id=1';
MyQuery1.Execute;
Memo1.Lines.Append(FloatToStr(MyQuery1['DTTime']));
end;
end.
I tested MyDAC 4.30.1.14 and the error was there aswell. I don't have build 13 nor 12, but 4.30.0.11 doen't have this error.
We wanna upgrade MySQL along the way from 4.0 to 4.1 and later 5.x. We DON'T need Errors like this. Should we downgrade to MyDAC 3.55.026 (whish also doesn't have this error) or what?
Which is a stabil, errorfree version of MyDAC for Delphi5 and MySQL 4.x?
Also the latest versions (including MyDAC 3.55.026) makes a lot of connections errors.
Code: Select all
Can't connect to MySQL server on 'localhost' (10061)
Socket error on connect. WSAGetLastError return 10048($2740)Code: Select all
MyConnection.Options.Protocol := mpTCPOther than the lastest Hickups, MyDAC is a great product. But we could use a MyDAC version "locked" to MySQL 4.0 and one for 4.1.
When I am using MySQl 4.0, the lastest version of MyDAC might not be right for me, but which version is?
Not every company is storming ahead and using MySQL 5.1.
Thank you for reading my post and I hope to get replies soon.