Contents

Components

You can combine data-access components and data controls to develop web applications that read or write on databases, and can perform advanced operations with them. Follow the steps below to configure a connection:

Note: You can use the Data Explorer instead to speed up the whole process.

Connect to a Database

To work with a database, you first need to get a working connection to one. In HTML5 Builder, the component that takes care of that connection is Database. You can either add a Database component to your application from the Tool Palette and then configure it, or you can drop a database onto the Designer directly from the Data Explorer, which will generate a Database component already configured.

Configure a DataSet

Once the connection is ready, you need to retrieve some data from it. There are several components you can use to retrieve data from a Database, those called DataSet components, components that extend the DataSet class.

DataSet components perform a query on the Database component and store the resulting data.

Associate a Component to the DataSet

There are some components that can be associated with a DataSet component so the former renders the data in the second. Those components are called data-aware components. But in order to make that association, you need a connector, a bridge between the DataSet component and the data-aware component: a Datasource component. That is why all data-aware components have a DataSource property you have to point to that DataSource component.