Page 1 of 1

Cant retrieve tinyint(1) with AsInteger

Posted: Wed 22 Dec 2004 15:31
by InfoSight
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

Re: Cant retrieve tinyint(1) with AsInteger

Posted: Thu 23 Dec 2004 14:31
by Ikar
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?

Posted: Mon 27 Dec 2004 14:47
by InfoSight
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

Posted: Mon 27 Dec 2004 14:59
by Ikar
> 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.

Posted: Mon 27 Dec 2004 16:04
by InfoSight
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

Posted: Mon 27 Dec 2004 21:11
by InfoSight
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