Problem with oleDbDataAdapter and MS Access Database
hi,
I have a problem regards with the using of oleDbDataAdpter in a Windows application form.
I need to create a simple application that reads the data from a MS Access Table and populates a comboBox.
I insert in my Form an oleDbDataAdpter and I create the connection and the query with the wizard.
I also insert in my form a dataset.
In the code, in the form_load event, I fill a dataset using the following instruction:
this->oleDbDataAdapter1->Fill(this->dataSet1,"Abbonamenti");
My problems are:
- I used the oledbDataAdapter correctly?
- How can I check if the dataset contains the correct data?
Thank you for the helpfulness.
Daniele.
Re: Problem with oleDbDataAdapter and MS Access Database
Re: Problem with oleDbDataAdapter and MS Access Database
Quote:
Originally Posted by
daniele.rolfo
In the code, in the form_load event, I fill a dataset using the following instruction:
this->oleDbDataAdapter1->Fill(this->dataSet1,"Abbonamenti");
My problems are:
- I used the oledbDataAdapter correctly?
- How can I check if the dataset contains the correct data?
To be honest: I don't have the slightest idea! :confused: How should I or anyone else know from the practically no information you provided? We need much more concrete information and in particular more concrete code than just a single line.
For starters, here's a thread that (AFAICT from what I know by now) is topically related and perhaps already provides some inspiration: http://www.codeguru.com/forum/showthread.php?t=508025
And please use code tags when posting code to preserve proper code formatting. Not using them was harmless with your one-liner, but the initial post of the thread I linked to perfectly demonstrates how bad it can get without them.