This topic describes common tasks that you can perform with data sources. For more detailed information, click the links in the right column.
| To perform this task... |
Follow these steps |
| Add a data source to the Servers window |
- In the Servers window, right-click the Data Sources node and choose Add Data Source.
- In the Add Data Source dialog box, specify the database information.
- Click Test Connection to verify that the information was entered correctly.
- Click Add.
|
| Add or edit a database server type |
- In the Servers window, right-click the Data Sources node and choose Edit Database Server Types.
- In the Edit Database Server Types dialog box, click New.
- In the Locate JDBC JAR Files dialog box, find the necessary JAR files.
- In the Edit Database Server Types dialog box, if it is not correct, enter or change the server information.
|
| Add a database table to a page |
- In the
Servers window
, expand the Data Sources nod.
- Expand the database-name node.
- Expand the Tables node.
- Drag the database table or view into the Visual Designer, or right-click the database table or view node and choose Add to Page.
|
| Bind data to a Table component |
- Add the Table component to the page.
- Drag the database table or view from the Servers window to the Visual Designer and drop the database table or view onto the Table component.
- If necessary, set the table layout.
|
| Bind data to list components (such as Listbox) in the Basic category of the Palette |
- Drag the database table or view from the Servers window and drop it onto the page.
- Right-click the component to which you want to bind the data and choose
Bind to Data.
|
| Bind data to simple components (such as Button) in the Basic category of the Palette |
- Drag the database table or view from the Servers window to the Visual Designer.
- Right-click the component to which you want to bind the data and choose Bind to Data.
- In the Bind to Data dialog box, choose the data provider and data field to which the bind the component.
|
| Create a data source alias |
- In the Servers window, right-click the Data Sources node and choose Add Data Source Alias.
- In the Data Source Alias Definition dialog box, enter the alias name.
- Choose the data source the alias should reference and click Add.
|
| Create an SQL query |
- Add a database table or view to a page.
- In the Outline window, right-click the table-nameRowSet item and choose Edit SQL Statement.
- In the Query Editor, edit the query.
|
| Delete a data source alias |
- In the Servers window, right-click the data-source-alias-name and choose Remove Data Source.
|
| Delete a database server type |
- In the Servers window, right-click the Data Sources node and choose Edit Database Server Types.
- In Edit Database Server Types dialog box, select the display name of the database server type to delete and click Delete.
|
| Delete a database table from the page |
- In the Outline window, right-click the table-nameRowSet item and
choose Delete.
- In the Outline window, right-click the table-nameDataProvider item and choose Delete.
|
| Edit a database server type |
- In the Servers window, right-click the Data Sources node and choose Edit Database Server Types.
- In the Edit Database Server Types dialog box, click New.
- In the Locate JDBC JAR Files dialog box, find the necessary JAR files and click Open.
- In the Edit Database Server Types dialog box, enter or change the server information and click Close.
|
| Export a set of data sources |
- In the Servers window, right-click the Data Sources node and choose Export Data Sources.
- In the Export Data Sources dialog box, select the data sources to export.
- Enter the location of the file to which to export the data sources and click OK.
- Make the exported file available to the developers who need it.
|
| Import a set of data sources |
- In the Servers window, right-click the Data Sources node and choose Import Data Sources.
- In the Open dialog box, find the file to import and click Open.
- In the Import Data Sources dialog box, select one or more data sources to import and click OK.
|
| Modify data source properties |
- In the Servers window, expand the Data Sources node.
- Right-click the data source to modify and choose Modify Data Source.
- Modify the data source information and click Modify.
|
| Remove a data source |
- In the Servers window, expand the Data Sources node.
- Right-click the data source that you want to remove and choose Remove Data Source.
|
| View data in a database table |
- In the Servers window, right-click the database table name and choose View Data.
- If desired, in the Query window, modify the query to specify the data to retrieve.
- Click Run Query.
|