No update of DBGrid based on TADOQuery?
- From: macaileacs <available@xxxxxxxxxxxx>
- Date: Wed, 22 Nov 2006 23:30:41 +0100
Hello
I have a TADOQuery based on two TADOTable components: tblOrders, tblCustomers (see details below).
The query is displayed in a TDBGrid (with persistent fields).
When I post a new record in table tblOrders, I expect to see the change immediately in the dbgrid, so I do the following:
MyQuery.Requery;
MyDBGrid.Repaint;
However, the grid is not updated after the new record is posted.
When I post a second record, then I the first one appears in trhe grid (and in general, if I post the Nth record, the (N-1)th appears in the grid).
Is there any way to show immediately the new query with the newly posted record? Could anybody help me with this?
Thanks for any suggestions.
----------------
Delphi 2006 for Win32
MS Access database
tblOrders, tblCustomers: TADOTable;
MyQuery: TADOQuery;
SQL:
SELECT Orders.N, Orders.T, Orders.C, Customers.Name, Customers.Postcode
FROM Orders
LEFT JOIN Customers
ON Orders.T = Customers.T
ORDER BY Orders.N
DESC
.
- Follow-Ups:
- Re: No update of DBGrid based on TADOQuery?
- From: Brian Bushay TeamB
- Re: No update of DBGrid based on TADOQuery?
- Prev by Date: Re: ADOQuery in thread hangs, Solved !!!!!!!!!
- Next by Date: Excel data problems
- Previous by thread: Cancelling an ADO Command takes too long
- Next by thread: Re: No update of DBGrid based on TADOQuery?
- Index(es):
Relevant Pages
|