Re: No update of DBGrid based on TADOQuery?



How are you posting the records?
Is this a query using Access?

--
Brian Bushay (TeamB)
Bbushay@xxxxxxxxx

Thanks for the reply.
Though I use an Access database (*.mdb file), I don't use Access directly; everything is supposed to happen within the application.

The records are posted like that:

with tblOrders do
begin
if not Active then Open;
Append;
FieldValues['Field1'] := 'some string';
//etc.
Post;
end;

I then do the following:
PostNewRecord;
qry.Requery;
dbGrid.Repaint;

From the behaviour, I get the impression that the record posting works asynchronously, that is, when Requery is called, it is not sure whether the the record is already posted, and requery and Repaint simply give the old state of the tables... Could this be the case? If yes, how can this be dealt with?

.



Relevant Pages

  • Table.Clear() does not
    ... I have an Access Database that I'm connected to. ... I want to requery the database and ... display only the pertinent fields. ... Here is a portion of the code that does the query. ...
    (microsoft.public.data.oledb)
  • Re: refresh form from the code
    ... Note In an Access project, the refresh and requery actions both ... > Now I want to get to this without clicking on the form2 ... >> Access Database Samples: www.rogersaccesslibrary.com ...
    (microsoft.public.access.forms)
  • Re: database gets placed in a State that prevents it from being opened
    ... You might need to issue a requery before accessing the data on the 2nd ... > i'm using the Timer Event in a Form to run a Query by setting ... The query fills a table with data that needs to be accessed ... > another Access database that links to that table. ...
    (microsoft.public.access.queries)
  • Re: Check for update in database
    ... >But I'm wondering if it is possible to notify me of the need to requery so ... >that the loading of requery can be minimized and I could know immediately if ... Brian Bushay (TeamB) ...
    (borland.public.delphi.database.ado)