MindFusion WinForms Programmer's Guide
Using VisualStudio 2003

Practical Tip: How to create a database connection using Visual Studio 2003?

 Note

Versions of MindFusion.Charting 3.2 and higher do not support design-time data binding in Visual Studio.NET 2003.

In order to use any data from a database you should first make a connection to the database (1), select the data you need (2) and transform the data in such format that it can be used in applications (3). Here is how to do this in Visual Studio.NET 2003

1. Make connection to the database

2. Select the data you need

3. Transform the data in a way it can be used in a  application

C#  Copy Code

OleDbDataAdapter1.Fill( dataSet1 );
chart1.DataBind();

 Notes:

  • Connection refers to the created SqlConnection or OleDbConnection object;
  • DataAdapter refers to the created SqlDataAdapter or OldDbDataAdapter;
  • chart1 refers to the instance of the Chart - derived class created - line, area, bar, radar;
  • dataSet1 refers to the newly created instance of the DataSet class;
  • OleDbDataAdapter1 refers to the newly created instance of the OleDbDataAdapter class. The same code counts when you use SqlDataAdapter.

See Also

Using VisualStudio 2005