ActiveX
To bind an fpSpread ActiveX control to a database using default fpSpread control settings
- Add the Microsoft ADO Data Control 6.0 (OLEDB) to your project.
- Create a Microsoft ADO Data Control 6.0 (OLEDB) on the form.
- Right-click on the Data control, and choose ADODC Properties from the pop-up menu.
- In the Property Pages, on the General property page, under Source of Connection,
-
In the Data Link Properties dialog,
- On the Provider tab,
-
On the Connection tab,
- Under item 1 on the tab, provide the database name to connect to either by typing it in the field or by pressing the ellipses button and selecting the database using the Select Access Database dialog.
- Under item 2 on the tab, if necessary, enter the user information required to log on to the database.
- Choose the Test Connection button.
- If the connection succeeded, select OK in the message box. If the connection did not succeed, repeat steps 5.b.i through 5.b.iii.
- Choose OK to continue and close the Data Link Properties dialog.
-
In the Property Pages, your connection string has been created in the Use Connection String text box.
You can use your connection string at run time to access this database connection.
- In the Property Pages, choose the RecordSource page.
- Add the FarPoint Spreadsheet ADO Control (OLEDB) to your project.
- Create an fpSpread control on the form.
- Set the DataSource property to the name of the Microsoft ADO Data Control 6.0 (OLEDB). If you wish to bind a specific sheet, then set the Sheet and DataSource properties at run time.