Board index » delphi » How to force the completion of a Post event
James M. Lucas
![]() Delphi Developer |
Mon, 18 Feb 2002 03:00:00 GMT
|
James M. Lucas
![]() Delphi Developer |
Mon, 18 Feb 2002 03:00:00 GMT
How to force the completion of a Post event
Using Append ... Post loop with quite a few records, sometimes the
Locate will return false especially on some slower machines. I am currently using Applications.ProcessMessages(); and then check Locate, if false, do a Refresh. This takes very long time to complete. Is there a more delicate way I can force the application to complete the post event for all the database update, so the Locate will always return true for just appended records? Thanks James |
Art Begu
![]() Delphi Developer |
Mon, 18 Feb 2002 03:00:00 GMT
Re:How to force the completion of a Post eventIs this on a network? If so: Are you sure that machine speed is the problem? Make sure local share = true in the bde configuration of every machine The OS on the posting machine could also be The processmessages loop may cause the James M. Lucas <JMLu...@LegendNet.com> wrote in message Quote> Using Append ... Post loop with quite a few records, sometimes the |
James M. Luca
![]() Delphi Developer |
Mon, 18 Feb 2002 03:00:00 GMT
Re:How to force the completion of a Post eventIt is a standalone program and can be configured to run on a network. The backend is Access 97 database. No cached update is involved. The strange thing is: If I dont call a Refresh, sometimes the just appended records do not show up in DBGrid, Locate will not always return true right after Post(If I open the very database with another program, the records are there). If I call a Refresh, of course, it works, but it becomes really slow. I could not do a timed check since I need a field from the new record right away: an autoinc field which I will use as index for further processing. Thanks. James QuoteArt Begun wrote: |
Art Begu
![]() Delphi Developer |
Mon, 18 Feb 2002 03:00:00 GMT
Re:How to force the completion of a Post eventAre you doing the locate in the afterpost event? Maybe instead try using PostMessage to post a user defined message that calls a procedure which contains the locate. That way the afterpost can finish cleanly. I don't know if that will help but it might. James M. Lucas <JMLu...@LegendNet.com> wrote in message Quote> It is a standalone program and can be configured to run on a network. The |
James M. Luca
![]() Delphi Developer |
Mon, 18 Feb 2002 03:00:00 GMT
Re:How to force the completion of a Post eventThanks for the suggestion, my structure is like this: A few records: for i := 0 to count do then trying to locate each autoinc id through I will try to find out if I could do something through postmessage way as you James QuoteArt Begun wrote: |
Art Begu
![]() Delphi Developer |
Tue, 19 Feb 2002 03:00:00 GMT
Re:How to force the completion of a Post eventIf your application is still being designed, maybe you should dump the autoincrement and instead store the next value in another table and increment the value in the other table after you get it. |
2. ListView Text Completion Tooltips (re-post)
3. Word completion, tab completion alt. hippie expand
4. COM events and Thread pooling / completion ports
5. How force dbCtrlGrid to post data immeditly
6. How force dbCtrlGrid to post data immediatly
8. Forcing a post - Key Violation