how to update lookup fields automatically

Discussion of open issues, suggestions and bugs regarding SDAC (SQL Server Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
Posts: 43
Joined: Fri 14 Oct 2005 13:45

how to update lookup fields automatically

Post by luis_augusto » Thu 17 Aug 2006 22:45

I am experiencing the following problem:

1. I am inputing data into a customer form
2. One of the fields is a Tdblookupfield (state/province), which is fed by a state/province table. At this point I notice that I need to complete the list of items, by going to the State/Province form.
3. Lucky me!, I have a button nearby to access that form, directly.
4. I go to it, insert and post the new record and return to the main form.
5. When I drop down the dblookupcombobox, I can´t see the new State/Province.
6. I have to leave the application and reenter it in order to refresh the dblookupcombobox

7. I used to use Paradox and the refreshing was automatic.
8. How come the same does not work with SDAC?
9. Is there a way to work around or solve this situation?


Posts: 2098
Joined: Tue 14 Feb 2006 10:14

Post by Antaeus » Mon 21 Aug 2006 08:08

Thank you for information. We will think about adding such possibility to SDAC.

Now if you use one MSTable (MSQuery) component for lookup field and second MSTable (MSQuery) component to edit table with lookup values, you should manually refresh first component immediately after editing the second one. If you use one MSTable (MSQuery) component both for lookup field and for editing, refreshing is not necessary.

Post Reply