Delphi ADO + MySQL + Developer Express Grid
I have problems using Mysql with MySQL Connector, I can successfully connect to a database on the net via O开发者_如何学CDBC, and in my grid I can display many records, however in the grid (Developper express) I seem to be unable to scroll. i think it is related to cursor locations etc etc, but I am not sure.
also recordcount and recno seems also not functioning, altho I can scroll back and forth
what will be the correct ADOConnection and ADOQuery properties to successfully use mysql ?
I will suggest to use 3d party components, like Anydac. They will work with MySQL right out of the box.
It seems better to use data acess components that are specialized for MySQL. MyDAC from DevART shoud be good enough. I do not use their MyDAC, but their SDAC (MS SQL access) successfully work in most of my projects. Or there should be other third-party components, may be free also.
With the DevExpress grid check out the GridMode and associated properties - this may have an effect. The DevExpress support knowledge base has many examples and questions about this. Also with some dataset types it's necessary to do something like:
dataset.Open;
dataset.Last;
dataset.First;
//...do stuff
in order to get the recordcount correct.
精彩评论