[DUG] MSSQL DBGrid Refresh
Eric A
eaa603 at hotmail.com
Wed May 16 19:45:04 NZST 2012
John,
Thanks for the suggestion, which I will try at some stage here. In the interim I've got around the problem by using the ADOQuery object instead of the ADOTable object.
Eric
From: johnkbird at paradise.net.nz
To: delphi at listserver.123.net.nz
Date: Wed, 16 May 2012 15:17:28 +1200
Subject: Re: [DUG] MSSQL DBGrid Refresh
You could try
DBGrid.Datasource:=nil;
DBGrid.Datasource:=ADOTable1; //this
should force a redisplay, as nilling it clears the grid.
Thats a tip I saw in the help for KBMemTable (superset of ClientDataSet)
which had all sorts of tips for speeding up loading and displays.
That tip will speed up posting lots of data etc as the DBGrid will not be
showing the updates (which also can cause flickering). Turning it on
afterwards shows the current state after all the updates have finished.
John
Bird
From: Eric A
Sent: Tuesday, May 15, 2012 8:51 PM
To: delphi at listserver.123.net.nz
Subject: [DUG] MSSQL DBGrid Refresh
I am using a DBGrid with an ADOQuery component for display, with
modifications to table data (edits, deletes, adds) being done using a ADOTable
component. CRUD operations are done using the table methods rather than
raw SQL code. There's a lot of fields in the database table so coding the
operations in SQL would be a pain.
Despite trying to refresh the data in
the DBGrid by closing then re-opening both the ADOTable and the ADOQuery
component the data in the DBGrid is not updated (unless I exit the application
and restart.
I've seen this problem mentioned in various postings but
haven't yet seen a solution. Can someone supply the elusive technique to
get the DBGrid data to refresh after the ADOTable data is changed?
Eric.
_______________________________________________
NZ Borland Developers Group -
Delphi mailing list
Post: delphi at listserver.123.net.nz
Admin:
http://delphi.org.nz/mailman/listinfo/delphi
Unsubscribe: send an email to
delphi-request at listserver.123.net.nz with Subject:
unsubscribe
_______________________________________________
NZ Borland Developers Group - Delphi mailing list
Post: delphi at listserver.123.net.nz
Admin: http://delphi.org.nz/mailman/listinfo/delphi
Unsubscribe: send an email to delphi-request at listserver.123.net.nz with Subject: unsubscribe
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://listserver.123.net.nz/pipermail/delphi/attachments/20120516/5fea1afa/attachment.html
More information about the Delphi
mailing list