Data Files Tab

From Lianjapedia
Revision as of 09:19, 27 March 2018 by Yvonne.milne (Talk | contribs)

Jump to: navigation, search

The App Inspector

The App Inspector is your best friend during development as it provides a complete overview of your App.

It is organized into Tabs. Each Tab is relevant to a particular workspace. You can double click a Tab to detach it into its own floating window.

Clicking the small icon on the far right of the App Inspector title bar will detach it into its own floating window.

Double clicking the window title bar when it is floating will attach it back into place.

App Inspector


The Data Files Tab

The Data Files Tab contains file lists pertaining to the Data Workspace.

Databases

The Databases tab contains the Database Names panel with a list of available databases.

Data Files Tab


Note: opening a database is not available when an App that already has an associated database is open.

Bm-noteicon.png
Pro Tip

If you have a project open you will only see the databases that have been added to that project.

Actionbar

From the actionbar you can:

  • Create a New database. This option is not available when an App that already has an associated database is open.
  • Delete the currently selected database. This option is not available when an App is open or the selected database is open. You will be prompted to confirm the operation.
  • Open the MetaData editor for the currently selected database. See MetaData Editor for information.
  • Access Additional Commands by clicking the cog button.
Actionbar


Additional Commands

Additional Commands


Menu Option More Information
Copy... Copies the currently selected database. You will be prompted to enter the name for the copy.
Backup... Backs up the currently selected database. This option is not available when an App is open. You will be prompted to confirm the operation. See also Backup and Restore during development.
Restore... Restores the currently selected database. This option is not available when an App is open. You will be prompted to confirm the operation. See also Backup and Restore during development.
Rebuild... Rebuilds the currently selected database. This option is not available when an App is open. You will be prompted to confirm the operation.
Optimize... Optimizes the currently selected database. This option is not available when an App is open. You will be prompted to confirm the operation.
Import VFP database... Imports a VFP database. This option is not available when an App is open. A new database will be created for the import with the same name as the .dbc file. See Importing Visual FoxPro Databases and Tables.
Import ODBC database... Imports third-party data via ODBC into the currently open database. This option is not available when an App is open. See Virtual Tables - Local Development, Remote Deployment.
Create Virtual Tables from ODBC... Creates Virtual Tables for third-party data via ODBC in the currently open database. This option is not available when an App is open. See Virtual Tables - Local Development, Remote Deployment.
Close Closes the selected database. This option is not available when an App is open.
Refresh Refreshes the database panel.

Context Menu

Right-clicking in the Database Names panel displays the databases context menu.

Context Menu


Menu Option More Information
New... Creates a new database. You will be prompted to enter the name for the new database. This option is not available when an App that already has an associated database is open.
Open Opens the selected database. This option is not available when an App that already has an associated database is open.
Delete... Deletes the currently selected database. This option is not available when an App is open or the selected database is open. You will be prompted to confirm the operation.
Copy... Copies the currently selected database. You will be prompted to enter the name for the copy.
Backup... Backs up the currently selected database. This option is not available when an App is open. You will be prompted to confirm the operation. See also Backup and Restore during development.
Restore... Restores the currently selected database. This option is not available when an App is open. You will be prompted to confirm the operation. See also Backup and Restore during development.
Rebuild... Rebuilds the currently selected database. This option is not available when an App is open. You will be prompted to confirm the operation.
Optimize... Optimizes the currently selected database. This option is not available when an App is open. You will be prompted to confirm the operation.
Import VFP database... Imports a VFP database. This option is not available when an App is open. A new database will be created for the import with the same name as the .dbc file. See Importing Visual FoxPro Databases and Tables.
Import ODBC database... Imports third-party data via ODBC into the currently open database. This option is not available when an App is open. See Virtual Tables - Local Development, Remote Deployment.
Create Virtual Tables from ODBC... Creates Virtual Tables for third-party data via ODBC in the currently open database. This option is not available when an App is open. See Virtual Tables - Local Development, Remote Deployment.
Create Local Virtual Tables... Creates Virtual Tables for an existing database in the currently open database. This option is not available when an App is open. See Virtual Tables - Local Development, Remote Deployment.
Create Local Virtual Tables where 1=0... Creates Virtual Tables with a zero row count for an existing database in the currently open database. This option is not available when an App is open. See Virtual Tables - Local Development, Remote Deployment.
Close Closes the selected database. This option is not available when an App is open.
Refresh Refreshes the database panel.

Tables

The Tables tab contains the Names and Triggers tabs. The Names tab contains table and column lists, the Triggers tab a list of the available triggers and current trigger procedures.

Names

By default, when a database is open, the Names tab is displayed within the Data Files Tab. Click on a table name in the Table Names panel to select it and display its columns and their attributes in the lower panels. Double-click to open it in the Data Editor in the Data Workspace. Note that this operation is not available when an App is open.

Table Names

Hover the mouse over a table name row to display information about the table:

Data Files Tab: Tables


Actionbar

From the actionbar you can:

  • Create a New table. This will open the CREATE A TABLE dialog.
  • Delete the currently selected table. You will be prompted to confirm the operation.
  • Open the MetaData editor for the currently selected table. See MetaData Editor for information.
  • Access Additional Commands by clicking the cog button.
Actionbar


Additional Commands

Additional Commands


Menu Option More Information
Add... Adds a table to the current database. This will open the Select a table dialog allowing you to select an existing table to add to the database. See also ADD TABLE.
Remove... Removes the table from the current database. It does not delete the table. You will be prompted to confirm the operation.

See also REMOVE TABLE.

New virtual table... Creates a new virtual table in the current database. You will be prompted to enter a name for the new virtual table, then the CREATE A VIRTUAL TABLE dialog will be displayed to allow you to configure the virtual table.
Modify virtual table... Modifies the currently selected virtual table. This option is not available when a native table is selected. The MODIFY A VIRTUAL TABLE dialog will be displayed to allow you to modify the virtual table.
Encrypt... Encrypts the currently selected table. See Encryption.
Decrypt... Decrypts the currently selected table. See Encryption.
MetaData editor... Opens the MetaData editor for the currently selected table. See MetaData Editor for information.
Optimize... Optimizes the currently selected table. This option is not available when an App is open.
Delete all... Deletes all the records in the currently selected table (ZAP). This option is not available when an App is open.
Close all... Closes all the tables. This option is not available when an App is open.
Refresh Refreshes the Table Names panel.

Context Menu

Context Menu


Menu Option More Information
New... Creates a New table. This will open the CREATE A TABLE dialog.
Open Opens the currently selected table in the Data Editor in the Data Workspace. Note that this operation is not available when an App is open.
Open in Window Opens the currently selected table in the Data Editor in the a floating window. Note that this operation is not available when an App is open.
Show in Explorer Opens the location of the currently selected table in the operating system file explorer.
Open Command Prompt Here Opens an operating system command prompt in the current database's directory.
Delete... Deletes the currently selected table. You will be prompted to confirm the operation.
Add... Adds a table to the current database. This will open the Select a table dialog allowing you to select an existing table to add to the database. See also ADD TABLE.
Remove... Removes the table from the current database. It does not delete the table. You will be prompted to confirm the operation.

See also REMOVE TABLE.

New virtual table... Creates a new virtual table in the current database. You will be prompted to enter a name for the new virtual table, then the CREATE A VIRTUAL TABLE dialog will be displayed to allow you to configure the virtual table.
Modify virtual table... Modifies the currently selected virtual table. This option is not available when a native table is selected. The MODIFY A VIRTUAL TABLE dialog will be displayed to allow you to modify the virtual table.
Encrypt... Encrypts the currently selected table. See Encryption.
Decrypt... Decrypts the currently selected table. See Encryption.
MetaData editor... Opens the MetaData editor for the currently selected table. See MetaData Editor for information.
Optimize... Optimizes the currently selected table. This option is not available when an App is open.
Delete all... Deletes all the records in the currently selected table (ZAP). This option is not available when an App is open.
Close all... Closes all the tables. This option is not available when an App is open.
Refresh Refreshes the Table Names panel.

Column Names

The middle panel in the Names tab displays the columns from the currently selected table. Double-click on a column name to open it in the MODIFY A COLUMN dialog so you can modify its definition and/or attributes.

Hover the mouse over a column name row to display information about the column:

Data Files Tab: Columns


Actionbar

From the actionbar you can:

  • Create a New column. This opens the CREATE A COLUMN dialog
  • Delete the currently selected column. You will be prompted to confirm the operation.
  • Navigate between the columns.
  • Open the MetaData editor for the currently selected column. See MetaData Editor for information.
  • Access Additional Commands by clicking the cog button.
Actionbar


Additional Commands

Additional Commands


Menu Option More Information
Modify Opens the MODIFY A COLUMN dialog for the currently selected column.
MetaData editor... Opens the MetaData editor for the currently selected column. See MetaData Editor for information.
Refresh Refreshes the Column Names panel.

Column Attributes

The bottom panel in the Names tab displays the definition and optional attributes for the currently selected column.

Data Files Tab: Column Attributes


Actionbar

From the actionbar you can:

  • Create a New column. This opens the CREATE A COLUMN dialog
  • Edit the currently selected column. This opens the MODIFY A COLUMN dialog
  • Delete the currently selected column. You will be prompted to confirm the operation.
  • Navigate between the columns.
  • Access Additional Commands by clicking the cog button.
Actionbar


Additional Commands

Additional Commands


Menu Option More Information
Modify Opens the MODIFY A COLUMN dialog for the currently selected column.
Refresh Refreshes the Column Attributes panel.

Triggers

The Triggers tab contains a list of Trigger Names.

Double-click a trigger name to create a Lianja/VFP script (.prg) to be associated with the trigger operation. The file will be created in the format:

<table-name>_<trigger-name>.prg

and will be opened in the Script Editor in the Apps Workspace.

If a script has already been associated with the trigger, the script name will appear in the list and double-clicking it will open it for editing in the Script Editor in the Apps Workspace.

Data Files Tab: Triggers


Trigger Operation
onopen Called after the table is opened.
onclose Called before the table is closed.
onbeforeinsert Called before inserting a record into the table. The script must return .T. (true) or the operation will be cancelled.
onafterinsert Called after inserting a record into the table.
onbeforeupdate Called before modifying an existing record. The script must return .T. (true) or the operation will be cancelled.
onafterupdate Called after modifying an existing record.
onbeforedelete Called before deleting an existing record. The script must return .T. (true) or the operation will be cancelled.
onafterdelete Called after deleting an existing record.

Actionbar

From the actionbar you can:

  • Edit the selected trigger script. This will open the file in the Script Editor in the Apps Workspace. If no trigger script yet exists, it will be created and opened for editing.
  • Delete the selected trigger script. You will be prompted to confirm the operation.
Actionbar


Procs

The Procs tab contains a list of stored procedure filenames.

Data Files Tab: Procs


Actionbar

From the actionbar you can:

  • Create a New stored procedure file. This will prompt for the filename, create it and open it in the Script Editor in the Apps Workspace.
  • Edit the selected stored procedure file. This will open the file in the Script Editor in the Apps Workspace.
  • Delete the selected stored procedure file. You will be prompted to confirm the operation.
Data Files Tab: Procs


See also Virtual Tables - Local Stored Procedures.

Events

The Events tab contains a list of Database Events.

Double-click an event name to create a Lianja/VFP script (.prg) to be associated with the event. The file will be created in the format:

<event>.prg

and will be opened in the Script Editor in the Apps Workspace.

If a script has already been associated with the event, the script name will appear in the list and double-clicking it will open it for editing in the Script Editor in the Apps Workspace.

Data Files Tab: Events


Actionbar

From the actionbar you can:

  • Edit the selected event script. This will open the file in the Script Editor in the Apps Workspace. If no event script yet exists, it will be created and opened for editing.
  • Delete the selected event script. You will be prompted to confirm the operation.
Data Files Tab: Events


Dock Tab

To dock the tab back in the App Inspector, click the [x] or double-click the window title bar.

Data Files Tab


See Also

Data Workspace