Guest_imported
New member
- Jan 1, 1970
- 0
Hi. I've got one problem. I've got 3 data adapters in my project. Two of them are used to populate a combo box, for a particular column in a table.
These combo boxes are on one of my forms that can be accessed by clicking a button on my main form. Also on my main form, I have a button to load another form in which I can add records to the table that the 2 data sets use.
On the form with the 2 combo boxes, I have the activate event set to fill the data adapters again. This works great--the newly entered records will show up in the combo boxes.
But my problem is that on the form with the 2 combo boxes, I also have some labels that work off of another table. They have their own data set and dataadapter. I fill the data adapter at form load, which works great. It displays the last record in my table, per my SQL statement.
Now on the SAME form with the combo boxes, and the labels, and all the data adapters, etc., I can add records to the table that uses those lables and the 3rd data set and adapter.
But using the dataadapter.fill() does not refresh what is in those labels. I have tried making a separate button just for the purpose of refilling it, I have tried putting fill in the form activate even and leaving the form, then coming back, but nothing works. The new record will show up if I exit the application and reload it.
Do I need to rebind these labels' text properties or something? If so, how?
It was a lot easier with the old adoControl.refresh.
I've even tried refreshing the labels themselves, just browsing through the methods to see what I could try to do.
Thanks
These combo boxes are on one of my forms that can be accessed by clicking a button on my main form. Also on my main form, I have a button to load another form in which I can add records to the table that the 2 data sets use.
On the form with the 2 combo boxes, I have the activate event set to fill the data adapters again. This works great--the newly entered records will show up in the combo boxes.
But my problem is that on the form with the 2 combo boxes, I also have some labels that work off of another table. They have their own data set and dataadapter. I fill the data adapter at form load, which works great. It displays the last record in my table, per my SQL statement.
Now on the SAME form with the combo boxes, and the labels, and all the data adapters, etc., I can add records to the table that uses those lables and the 3rd data set and adapter.
But using the dataadapter.fill() does not refresh what is in those labels. I have tried making a separate button just for the purpose of refilling it, I have tried putting fill in the form activate even and leaving the form, then coming back, but nothing works. The new record will show up if I exit the application and reload it.
Do I need to rebind these labels' text properties or something? If so, how?
It was a lot easier with the old adoControl.refresh.
I've even tried refreshing the labels themselves, just browsing through the methods to see what I could try to do.
Thanks