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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Object saves slower than form grabs info

Status
Not open for further replies.

Guru2B

Programmer
May 24, 2000
77
GB
Hi,

I have a form that allows a user to modify a record using a class behind the form. Once the record is saved, the form closes and a listbox on the main form is populated via SQL with the updated records from the DB.

The problem seems to be that when the listbox is populated, the class has not yet saved the data to the db (I am still seeing the old information in the listbox - although not all the time). This leads me to believe that this has something to do with threads...not sure, just a guess. I have tried increasing the time between save and list populate by using loops, but depending on what is running on my machine at the time, the times are still not enough or more than necessary.

Is there any way to ensure that the class has written the data to the DB before returning to the calling procedure?

Any thoughts?
 
hello,

I had the same problem and i solved it by either a message box (something like "your data has been saved") before the listbox is populated again, or you could work with a timer object, letting the app a few seconds time to save the data before populating listbox...

maybe you should take a closer look to your sql-query to make it faster...

i hope this can help you
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top