Wednesday, June 29, 2011

An OLE DB Provider was not specified in the ConnectionString. An example would be, 'Provider=SQLOLEDB;'.


We are using typed dateset in DataAccess layer. I faced a weird issue while trying to add a new column with some of the datatables in the typed dataset for eg. USER table. But I can edit datatables of some other typed datasets which are also resides in the same location.

To add the column, I right-clicked on the DataTable. In the quick menu, i have selected the Add->columns. Entered new column name. When i pressed the save option in the Visual Studio, i got the following message.
"An OLE DB Provider was not specified in the ConnectionString.  An example would be, 'Provider=SQLOLEDB;'."

Finally. we resolved this issue by simply removing some annotaion tags in the dataset. Following are the steps to do that.

1. Open the typed dataset in Xml editor( Right click the *.axd file --> open with --> Xml Editor (default))
2. Find for <xs:annotation> tag.
3. Remove entire tag.(There will be some inner tags. if you want take a back up of those lines, do it)
4. Save the file.
5. Close the Xml view.
6. Once again open the typed dataset in the Dataset designer.
7. Try to add the columns.
Now you will be able to add/edit columns. I don't know what actually happens!!