Cant retrieve tinyint(1) with AsInteger

Cant retrieve tinyint(1) with AsInteger

Postby 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
InfoSight
 

Re: Cant retrieve tinyint(1) with AsInteger

Postby 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?
Ikar
 
Posts: 1693
Joined: Thu 28 Oct 2004 13:56

Postby 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
InfoSight
 

Postby 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.
Ikar
 
Posts: 1693
Joined: Thu 28 Oct 2004 13:56

Postby 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
 

Postby 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
InfoSight
 


Return to MySQL Data Access Components