ComponentOne True DBGrid for .NET (2.0) Search HelpCentral 

Modifying the ConnectionString

To change the location of the C1TDBGDemo.mdb reference, you can edit the ConnectionString property of the OleDbConnection.

1.   In the C1TrueDBGrid Tasks menu, select Add Project Data Source from the drop-down box next to Choose Data Source.

2.   The Data Source Configuration Wizard appears. Select Database on the Choose a Data Source type page.

3.   Click the New Connection button to create a new connection or choose one from the drop-down list.

4.   Click the Browse button to specify the location of the data and enter the correct login information. Click the Test Connection button to make sure that you have successfully connected to the database or server and click OK. The new string appears in the on the Choose your data connection page.

5.   Click the Next button to continue. A dialog box will appear asking if you would like to add the data file to your project and modify the connection string. Click No.

6.   Save the connection string in the application configuration file by checking the Yes, save the connection as box and entering a name. Click the Next button to continue.

7.   On the Choose your database object page, select the tables and fields that you would like in your dataset. Enter a name for your DataSet in the DataSet name box and click Finish to exit the wizard.

A DataSet and connection string are added to your project. Additionally, Visual Studio automatically creates the code to fill the DataSet.


Send comments about this topic to ComponentOne.
Copyright © ComponentOne LLC. All rights reserved.