Rather than doing a Refresh you could do an Open and a Close. If you do this you probably want to store what record you are on

id := QToDo.FieldByName(id).AsInteger;
QToDo.Close;
QToDo.Open
QToDo.Locate('id', id, []);

substituting id for whatever your primary key is. Not elegant but better than restarting the application.

Alister Christie
Computers for People
Ph: 04 471 1849 Fax: 04 471 1266
http://www.salespartner.co.nz
PO Box 13085
Johnsonville
Wellington


On 14/01/2011 12:49 p.m., Marshland Engineering wrote:
I'm viewing a SQL query in a dbgrid. When I add a record to the source db and I run QToDo.Refresh it does not include the new record in the dbgrid. If I close the application and re-run it, the record is displayed.
Is refresh the correct property or is there something else.
Thanks Wallace


_______________________________________________
NZ Borland Developers Group - Delphi mailing list
Post: delphi@delphi.org.nz
Admin: http://delphi.org.nz/mailman/listinfo/delphi
Unsubscribe: send an email to delphi-requ...@delphi.org.nz with Subject: 
unsubscribe
_______________________________________________
NZ Borland Developers Group - Delphi mailing list
Post: delphi@delphi.org.nz
Admin: http://delphi.org.nz/mailman/listinfo/delphi
Unsubscribe: send an email to delphi-requ...@delphi.org.nz with Subject: 
unsubscribe

Reply via email to