Data binding in Visual Studio Express
Posted: Tue 25 Sep 2007 23:01
I've tried to bind a mySqlDataAdapter to a data grid view, but without much success (in C# Visual Studio Express 2005).
The following is working:
- mySqlConnection
- mySqlCommand (data is returned when one clicks on Execute )
But the DataAdapter Fill and Preview fails (although I can bind the specific table to the data grid view in the designer, but no data is being displayed when I run the application):
- Fill -> SelectCommand property not initialized before calling Fill
- Preview -> Unable to cast COMObject of type System.__ComObject ... No such Interface supported ...
Is there any order in which the Core Lab objects should be loaded?
The following has been added:
- MySQLConnector
- MySQLDataAdapter
- MySQLDataSet
- GridView with Binding Source
Any help or pointers will be appreciated (I also need to bind data to a form with text fields, but that's another story) ...
The following is working:
- mySqlConnection
- mySqlCommand (data is returned when one clicks on Execute )
But the DataAdapter Fill and Preview fails (although I can bind the specific table to the data grid view in the designer, but no data is being displayed when I run the application):
- Fill -> SelectCommand property not initialized before calling Fill
- Preview -> Unable to cast COMObject of type System.__ComObject ... No such Interface supported ...
Is there any order in which the Core Lab objects should be loaded?
The following has been added:
- MySQLConnector
- MySQLDataAdapter
- MySQLDataSet
- GridView with Binding Source
Any help or pointers will be appreciated (I also need to bind data to a form with text fields, but that's another story) ...