Fields property

Discussion of open issues, suggestions and bugs regarding MyDAC (Data Access Components for MySQL) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
flashDEVART
Posts: 8
Joined: Sat 01 Nov 2008 15:08

Fields property

Post by flashDEVART » Sat 01 Nov 2008 15:39

Hi, all.
This is not specific question about MySQL, but....

1. Table have 2 fields: 'NAME' and 'DATE';
2. TMyQuery, SELECT * FROM ;
3. If property Fields is empty before query, Fields.Count = 2, ok;
4. If I add one TField to Fields (via Fields editor or runtime code) , Fields.Count = 1;

Questin: If I do item 4, how I can access to field 'DATE' via same TMyQuery?
FindField('DATE) = nil

Dimon
Devart Team
Posts: 2910
Joined: Mon 05 Mar 2007 16:32

Post by Dimon » Tue 04 Nov 2008 13:34

If you create fields before opening dataset you should add all fields to which you need to have access. You can do it using the "Add all fields" pop-up menu of Fields Editor.

Post Reply