Cant retrieve tinyint(1) with AsInteger

Discussion of open issues, suggestions and bugs regarding MyDAC (Data Access Components for MySQL) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
InfoSight

Cant retrieve tinyint(1) with AsInteger

Post by InfoSight » Wed 22 Dec 2004 15:31

Just updated MySQL to 4.1.8 and MyDAC to 3.30 and now I can't access a tinyint(1) field using

TMyQuery1->FieldByName("XYZ")->AsInteger

Using BCB5.

Also, the connection process now takes several seconds instead of the old 1 second or so. Why so slow now?

Thanks,
InfoSight

Ikar
Posts: 1693
Joined: Thu 28 Oct 2004 13:56

Re: Cant retrieve tinyint(1) with AsInteger

Post by Ikar » Thu 23 Dec 2004 14:31

Since MyDAC 3.10.1.7 TinyInt(1) fields are represented as TBooleanField. To solve problems declare these fields as TinyInt(4) or set TCustomMyDataSet.Options.EnableBoolean := False

> Also, the connection process now takes several seconds instead of the old 1
> second or so. Why so slow now?

Does this time depends on MyConnection.Options.Direct property?

InfoSight

Post by InfoSight » Mon 27 Dec 2004 14:47

Thanks for the info on boolean type. Using AsBoolean fixed the problem.

Regarding the long connection time, yes it is the same regardless of the setting of the Direct property. However, when Direct is False, after the delay I get an error:

"Client does not support authentication protocol requested by server; consider upgrading MySQL client."

Options->Protocol is set to mPDefault.

Thanks,
InfoSight

Ikar
Posts: 1693
Joined: Thu 28 Oct 2004 13:56

Post by Ikar » Mon 27 Dec 2004 14:59

> Regarding the long connection time, yes it is the same
> regardless of the setting of the Direct property. However,
> when Direct is False, after the delay I get an error:

> "Client does not support authentication protocol requested by server; consider upgrading MySQL client."

You should update libmysql.dll to actual version.

InfoSight

Post by InfoSight » Mon 27 Dec 2004 16:04

Ok, thanks for the info. The error message is now gone and I can connect. However, it still takes about 6 seconds to connect compared to less then 1 second with the old version.

Thanks,
InfoSight

InfoSight

Post by InfoSight » Mon 27 Dec 2004 21:11

I found the slow connection problem. Must have been a reverse DNS issue with the server. Just added my client's host name/ip to the server's hosts file:

\windows\system32\drivers\etc\hosts

and connection is very quick now.

Thanks,
InfoSight

Post Reply