Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Refreshing TDBGrid using ADO tables

Status
Not open for further replies.

Japie79

Programmer
Sep 4, 2010
6
ZA
Hi guys

I'm currently working on a POS system that uses ADO (MSAccess) database. The problem I have is that once I insert or delete a new record in a table, I have to completely exit the application before the new record will be displayed in the TBGrid for that specific table. When I insert a new record, I use the TADOTable insert method and use the Post method when I'm done. Are there any other methods that I must call to make the new records visible in the TDBGrid without having to exit the program and restarting it.

 
It's been a long time since I used TDBGrid, but there's got to be some Requery or Refresh method or something similar you can call. Depending on how you load the records, you might requery or reopen the underlying Recordset.
 
I will try the reopen of the dataset. I never close a dataset once I insert a record, but I might have to close it and then open it again, as the refresh method has not worked.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top