Guest_imported
New member
- Jan 1, 1970
- 0
I’ve just starting learning a bit about CDatabase & CDaoDatabase. I’ve been able to get CDaoDatabase working without too many problems but I’ve found using CDatabase a real pain.
My situation is this; I have a simple little program that allows the user to add records to a database (ODBC), plus I have a listbox showing the records created so far. When the user adds a record I then trigger off the routine for displaying that record in the listbox (by extracting it’s details from the database), but it doesn’t find it!, unless I add a Sleep after the code where the record is created. In other words it appears that I am asking for details of the record before it’s creation is completed.
Is there any way to get the system to wait for the database processing to complete before moving on to the next statement in my program? I’m new to DB programming so I’m probably missing something obvious. Any help would be much appreciated.
Thanks.
My situation is this; I have a simple little program that allows the user to add records to a database (ODBC), plus I have a listbox showing the records created so far. When the user adds a record I then trigger off the routine for displaying that record in the listbox (by extracting it’s details from the database), but it doesn’t find it!, unless I add a Sleep after the code where the record is created. In other words it appears that I am asking for details of the record before it’s creation is completed.
Is there any way to get the system to wait for the database processing to complete before moving on to the next statement in my program? I’m new to DB programming so I’m probably missing something obvious. Any help would be much appreciated.
Thanks.