Data Explorer lets you add database connections, and then generate components already setup to work with those databases.
It makes developing database applications extremely easy and fast. Once you add a connection to a database, you can browse the whole database from HTML5 Builder, and drag and drop pieces of data from the Data Explorer into the Designer, to generate data-aware components already setup to work with that data.
Add a Connection
To add a new connection to the Data Explorer:
- Right-click your database management system in the treeview.
- Click Add New Connection.
- Enter a name for your new database connection.
- Click OK.
- Expand your database management system in the treeview, right-click your new connection and then click on Modify Connection.
- Connection data was filled with default values. Now you must replace those values with the actual values your application will use to connect to your database. For some DBMS, you might need to check their pages for additional information: DB2, Firebird, Informix, InterBase, Microsoft SQL Server, MySQL, NexusDB, Oracle, PostgreSQL, SQLite.
- Once the fields contain the right information, click Test Connection button (at the bottom of the dialog). A message will pop up confirming database connection works.
- Click OK to save the changes.
Your connection is now properly setup. You can now use the treeview to browse your database, open tables, drag components into the Designer, and more.
Browse your Database
To see the list of object on your database (tables, views, and procedures), expand its connection node on the Data Explorer treeview.
Note: If you receive an error because your connection is not live, you should refresh your provider, and/or modify your connection.
To retrieve data from your database:
- Expand its connection node on the Data Explorer treeview.
- Right-click a table name and select Retrieve Data From Table.
Your data will be retrieved on the Data view, where you can work with it.
You can also perform raw SQL queries against your database:
- Right-click its connection node on the Data Explorer treeview, and select SQL Window.
- Go to the Code view.
- Write the SQL code for your query.
- Get back to the Design view.
You will get the results in a table. You can then edit them at your will.
Drag and Drop Data
- When you drag a database from the Data Explorer and drop it into the Designer, a Database component is generated and properly setup.
- When you drag a table from the Data Explorer and drop it into the Designer:
- New Database component is generated and properly setup, or an existing one is used if available.
- New DataSource and Table components are generated an properly setup.
- A DataSet component is generated and properly setup. The type of DataSet component to be generated can be selected from the Datasets drop-down list in the top of the Data Explorer, a DBRepeater by default.
- When you drag a field from the Data Explorer and drop it into the Designer:
- New Database, DataSource and Table components are generated and properly setup, or existing ones are used if available.
- A new component is generated and properly setup to display the content of the field. The type of component to be generated can be selected from the Fields drop-down list in the top of the Data Explorer, a Label by default.