Add a data source to a form

Completed

To display content on a page in the user interface, a data source must be added to a form in the form designer window of Visual Studio. You can select and drag a table or query from your project in the Solution Explorer window or drag a system table from the Application Explorer window. You can choose to use one table or many tables, depending on the number of fields that you will use for your form.

Screenshsot of the Visual Studio Form designer window highlighting Data Sources options.

Follow these steps to add a data source from the Application Object Tree (AOT) to your form by using a select and drag process:

  1. Ensure that your form is open in the form designer window in Visual Studio.
  2. In the Application Explorer window, expand the AOT node. You can view the Application Explorer window by going to View > Application Explorer.
  3. Expand the Data Model node.
  4. Expand the Tables or Table Extensions node, depending on the type of data source that you are adding.
  5. Select and drag your desired table from the AOT node to the Data Sources node in the left pane of the form designer window.

Gif of the add a data source from the AOT to a form.

Alternatively, you can add a data source to your form by using the Data Sources node in the form designer.

Follow these steps to add a data source from your project:

  1. Ensure that your form is open in the form designer window in Visual Studio.
  2. In the left pane of the designer, right-click the Data Sources node and select New Data Source.
  3. Select DataSource1 under the Data Sources node and go to the Properties window.
  4. Select your table in the Table property drop-down menu. You can also select any table from the AOT node in this menu.