Difference between revisions of "Data Files Tab"
Yvonne.milne (Talk | contribs) (→See Also) |
Yvonne.milne (Talk | contribs) (→Names) |
||
Line 140: | Line 140: | ||
====Names==== | ====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. | + | 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''' | '''Table Names''' | ||
Line 150: | Line 150: | ||
'''Actionbar''' | '''Actionbar''' | ||
+ | [[{{ns:file}}:df_tab_tables_ac.png|left|link={{filepath:df_tab_tables_ac.png}}|Data Files Tab: Tables]] | ||
+ | <br clear=all> | ||
'''Additional Commands''' | '''Additional Commands''' | ||
Line 170: | Line 172: | ||
− | '''Additional Commands''' | + | '''Additional Commands''' |
====Triggers==== | ====Triggers==== |
Revision as of 11:20, 22 December 2017
Under Construction
Contents
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.
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.
This option is not available when an App that already has an associated database is open.
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.
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.
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:
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.
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.
Procs
The Procs tab contains a list of stored procedure filenames.
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.
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.
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.