Data Explorer
Data Explorer lets you add database connections, and then generate components already setup to work with those databases. You can access it from View > Data Explorer.
It makes developing database applications extremely easy and fast. Once you add a connection to a database, you can browse the whole database from RadPHP, 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.
Contents |
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: Interbase, Microsoft SQL Server, Oracle.
- 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
Objects
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.
Data
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 Manager, where you can work with it.
Queries
You can also perform raw SQL queries against your database:
- Right-click its connection node on the Data Explorer treeview, and select SQL Window.
- On the Data Manager, go to the Code tab (tabs are on the bottom).
- Write the SQL code for your query.
- Get back to the Design tab.
You will get the results in a table. You can then edit them at your will.
Drag and Drop Data
- Database
- When you drag a database from the Data Explorer and drop it into the Designer, a Database component is generated and properly setup.
- Table
- 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 DBGrid by default.
- Field
- 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.