2

Right, this is probably going to be pretty simple. I have a form that contains a grid, if you select one of the records and press 'Edit' you get taken to another form where you can edit the data attached to that record - this all works.

However upon saving it will write it to the database but will not update the aforementioned grid until I come out of my program all together and then go back in.

All I want to do is get the grid to update when exiting the other form.

I have tried opening/closing the table components, calling the 'refresh' against the query and the table. I am connecting to the database using BDE and writing this in Rad Studio XE2.

Any help would be appreciated.

menjaraz
  • 7,551
  • 4
  • 41
  • 81
  • 4
    See [how-to-refresh-dbgrid-without-close-and-open-dataset-in-delphi](http://stackoverflow.com/questions/2311007/how-to-refresh-dbgrid-without-close-and-open-dataset-in-delphi) if that helps. – LU RD Dec 12 '11 at 00:12

1 Answers1

1

Hope this solves your problem

Table1.Active := False;  
Table1.Active := True;

for a TTable and

TQuery1.Active := False;
TQuery1.active := True;

for a TQuery

Shirish11
  • 1,587
  • 5
  • 17
  • 39