Database Explorer
- Open the Database Explorer
- Add Database
- Remove Database
- Remove Tables or Views
- Create a Passive-Link Table
- Create an Alpha Anywhere .DBF Table
- Count Table Rows
- Display Table Data
- Display Column Data
- Create a SQL Expression
- Create a Layout
- Generate SQL Syntax
- Open an Alpha Anywhere Layout
- View an Alpha Anywhere Set's Structure
- View the properties of any table field
Description
The Database Explorer provides a quick way to examine the properties of the tables and sets in your database. The Local Tables section lists the tables (including passive-link tables) and sets in your database. When you expand the Tables section and expand a table, you will see a list of the table's fields. The entry will contain the field type and length of each field. The Sets section lists the tables in each set and their linking relationships. A single arrow indicates a one-to-one relationship. A double arrow indicates a one-to-many relationship.
Open the Database Explorer
Display the Control Panel.
Select Tools > External Databases > Database Explorer.
You can also open Database explorer from the Web Projects Control Panel by Selecting Tools > Database Explorer.
Add Database
The Database Explorer can display the contents of SQL back-end databases.
Right click on (Local Tables) and select Add database to explorer... .
Use the Connection String dialog to define the connection string that establishes the link to the back-end database.
Remove Database
The Database Explorer will display details about the fields of Tables, Views, and Linked Tables. To remove a database from the Database Explorer, right click on it and select Remove database from explorer... .
Remove Tables or Views
To remove tables or views listed under a back-end database:
Right click on a back-end database and select Drop Table(s), View(s)... to display the Select Tables to Drop dialog.
Optionally, limit the tables or views listed by de-selecting the Tables, Views, Linked Tables, Synonyms, and Aliases check boxes.
Place checks to the left of the items you wish to drop.
Click OK to continue.
Create a Passive-Link Table
To create a passive-link table based on a back-end database table.
Expand a back-end database listing to display its tables.
Right click on a table and select Save as ... > Passive-link table.
Enter the new table name in the Specify Table Name dialog.
Click OK to continue.
Create an Alpha Anywhere .DBF Table
To create an Alpha Anywhere table from the data in a back-end database table.
Expand a back-end database listing to display its tables.
Right click on a table and select Save as ... > Alpha Anywhere (.dbf) table.
Enter the new table name in the Specify Table Name dialog.
Click OK to continue.
Count Table Rows
To count the rows of a back-end database table.
Expand a back-end database listing to display its tables.
Right click on a table and select Count rows in table.
Display Table Data
To display the first 100 rows of a back-end database table.
Expand a back-end database listing to display its tables.
Right click on a table and select Show data in table.
Display Column Data
To display the data in a column in the first 100 rows of a back-end database table.
Expand a back-end database listing to display its tables.
Expand a table to display its column definitions.
Right click on a column and select Show data in column.
Create a SQL Expression
To create and test a SQL expression for any of the attached databases:
Optionally, right click on a back-end database and select Open Query Builder to display the SQL Genie.
Optionally, right click on a back-end database and select Open SQL Command Window to display the SQL Command Window.
Copy the finished SQL statement for use in your application.
Create a Layout
To create a layout based on the data in a back-end database table.
Expand a back-end database listing to display its tables.
Right click on a table and select Create Layout.
Select Report, Label, or Letter to display the Design-Time Properties dialog.
Enter the number of records to retrieve and click OK.
If you are creating a report, continue with Creating Reports.
If you are creating a label, continue with Create a Label Layout.
If you are creating a letter, continue with Letter Overview.
Generate SQL Syntax
The Database Explorer can create SQL syntax for:
creating a table
inserting data into a table
deleting data from a table
updating data in a table
Expand a back-end database listing to display its tables.
Right click on a table and select SQL Syntax.
Select an option:
Create table
Insert statement
Delete statement
Update statement
Optionally, copy the code in the resulting window.
Open an Alpha Anywhere Layout
You can open any Alpha Anywhere layout:
Expand (Local Tables) to display the Alpha Anywhere tables and sets.
Right click on any table or set to select:
Default browse
Default form
Form, then any form layout
Browse, then any browse layout
Report, then any report layout
Label, then any label layout
Letter, then any letter layout
View an Alpha Anywhere Set's Structure
To view the structure, fields, and indexes of a set.
Expand (Local Tables) to display the Alpha Anywhere sets.
Right click on any set and select View set structure... to display the Set Information dialog.
View the properties of any table field
The Database Explorer lets you view the properties of any table field, i.e. basic schema information like field name, its type, and size. You can do this, for example, by right clicking on any given set and selecting 'Show Set Structure' from the dropdown. This should reveal the sets properties.