Difference between revisions of "Data Files Tab"

From Lianjapedia
Jump to: navigation, search
(The Data Files Tab)
(Tables)
Line 137: Line 137:
  
 
===Tables===
 
===Tables===
The '''Tables''' tab contains the '''Names''' and '''Triggers''' tabs.
+
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====  
 
====Names====  
Line 174: Line 174:
 
====Triggers====
 
====Triggers====
 
The '''Triggers''' tab contains a list of '''Trigger Names'''.
 
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:
 +
<pre><table-name>_<trigger-name>.prg</pre>
 +
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]].
 +
 +
[[{{ns:file}}:df_tab_triggers.png|left|link={{filepath:df_tab_triggers.png}}|Data Files Tab: Triggers]]
 +
<br clear=all>
 +
 +
{| class="wikitable" width="100%"
 +
!width="25%"|Trigger
 +
!width="75%"|Operation
 +
|-
 +
|valign="top"|onopen||Called after the table is opened.
 +
|-
 +
|valign="top"|onclose||Called before the table is closed.
 +
|-
 +
|valign="top"|onbeforeinsert||Called before inserting a record into the table.  The script must return .T. (true) or the operation will be cancelled.
 +
|-
 +
|valign="top"|onafterinsert||Called after inserting a record into the table.
 +
|-
 +
|valign="top"|onbeforeupdate||Called before modifying an existing record.  The script must return .T. (true) or the operation will be cancelled.
 +
|-
 +
|valign="top"|onafterupdate||Called after modifying an existing record.
 +
|-
 +
|valign="top"|onbeforedelete||Called before deleting an existing record.  The script must return .T. (true) or the operation will be cancelled.
 +
|-
 +
|valign="top"|onafterdelete||Called after deleting an existing record.
 +
|-
 +
|}
  
 
'''Actionbar'''
 
'''Actionbar'''
 +
 +
[[{{ns:file}}:df_tab_triggers.png|left|link={{filepath:df_tab_triggers.png}}|Data Files Tab: Triggers]]
 +
<br clear=all>
  
 
===Procs===
 
===Procs===

Revision as of 10:05, 22 December 2017

Under Construction

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


This option 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.

Table Names

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

Data Files Tab: Tables


Actionbar


Additional Commands


Context Menu


Column Names

Actionbar


Additional Commands


Column Attributes

Actionbar


Additional Commands

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

Data Files Tab: Triggers


Procs

Actionbar

Events

Actionbar

See Also

Category:Data Workspace