Collapse AllExpand All

2.1. Connecting to a Database

The MetaSQL Editor can be an extremely useful tool for report authors who want to test the accuracy of their MetaSQL statements during the process of writing report definitions. To open the MetaSQL Editor, run it from the location where it is installed. The following screen will appear:

MetaSQL Editor

To perform tests using the MetaSQL Editor, you must first connect to your target database. To connect to a database, select the Database option from the File submenu, as shown in the following screen:

Connecting to a database

For the purposes of this example, we will be connecting to an xTuple database. That explains why, when we select the Connect option, we are brought to a database login screen which has been customized for the xTuple application:

MetaSQL Editor - connecting to the database

Under the OPTIONS button, we specify our server, database, and port connection information. And then, we are asked to enter a valid username and password.

Once we have successfully connected to our target database, we can begin testing the accuracy of embedded MetaSQL statements using the MetaSQL Editor.