
February 19th, 2013, 08:48 AM
|
|
Contributing User
|
|
Join Date: Jun 2008
Posts: 251
 
Time spent in forums: 2 Days 22 h 50 m 14 sec
Reputation Power: 5
|
|
|
I'm not sure I understand what the actual question is. If it's about how to add the fields to your Access database, I would highly recommend that you do that through Access, not through your program. Adding the columns is a one time event, so once it's added, you wouldn't need to run that code ever again. Kind of a waste to code it, only to run it once, when using Access itself is so much easier.
As far as having Delphi "see" the changes, it does so, but you will need to take into consideration your query's actual SQL and which fields were added in the field's editor.
If your SQL iterates the actual columns you want to return Select <column1>, ... versus select *, then you will need to add the new columns to the select list i.e. Select <column1>, ..., <newcolumn1>, <newcolumn2> from ...
To add the new fields to the fields editor, double click on the table or query component, right click in the field's editor and select add all fields. Any new fields will be added.
|