Difference between revisions of "Importing Visual FoxPro Databases and Tables"
Yvonne.milne (Talk | contribs) |
Yvonne.milne (Talk | contribs) |
||
Line 10: | Line 10: | ||
Visual FoxPro databases (.dbc files) can be quickly and easily imported into the Lianja format for use in your Apps. To import a Visual FoxPro database, select the Data Workspace and make sure no database is open. You then have two ways to import your database: drag and drop import or the '''Import VFP database''' command. | Visual FoxPro databases (.dbc files) can be quickly and easily imported into the Lianja format for use in your Apps. To import a Visual FoxPro database, select the Data Workspace and make sure no database is open. You then have two ways to import your database: drag and drop import or the '''Import VFP database''' command. | ||
− | ===Drag and | + | ===Drag and drop import=== |
[[{{ns:file}}:dnddbc.png|450px|thumb|left|link={{filepath:dnddbc.png}}|Drag 'n' drop VFP database]] | [[{{ns:file}}:dnddbc.png|450px|thumb|left|link={{filepath:dnddbc.png}}|Drag 'n' drop VFP database]] | ||
Line 87: | Line 87: | ||
Note that Lianja has automatically built the indexes for the imported tables. | Note that Lianja has automatically built the indexes for the imported tables. | ||
+ | |||
+ | <br clear=all> | ||
+ | |||
+ | ==Import ODBC database== | ||
+ | [[{{ns:file}}:importodbc1.png|450px|thumb|left|link={{filepath:importodbc1.png}}|Import ODBC database]] | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | If you have the Visual FoxPro ODBC Driver, you can also import databases this way, although it is more commonly used to provide developers with a local copy of SQL databases such as Microsoft SQL Server or MySQL. | ||
+ | |||
+ | |||
+ | Firstly, create a database and make sure it is open before starting the import | ||
+ | |||
+ | <br clear=all> | ||
+ | |||
+ | [[{{ns:file}}:importodbc2.png|450px|thumb|left|link={{filepath:importodbc2.png}}|Import ODBC database]] | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | Switch back to the Databases explorer, then select '''Import ODBC database...''' from '''Additional commands''' or the right-click context menu. | ||
+ | |||
+ | <br clear=all> | ||
+ | |||
+ | [[{{ns:file}}:importodbc3.png|450px|thumb|left|link={{filepath:importodbc3.png}}|Import ODBC database]] | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | Enter the name of your ODBC DSN or connection string in the dialog, specifying the username and password if required. | ||
+ | |||
+ | |||
+ | To only import specific tables, click '''Tables''' and make your selection. | ||
+ | |||
+ | |||
+ | To start the import, click '''Import'''. | ||
+ | |||
+ | <br clear=all> | ||
+ | |||
+ | [[{{ns:file}}:importodbc4.png|450px|thumb|left|link={{filepath:importodbc4.png}}|Import ODBC database]] | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | The Console Workspace will be selected to show the progress of the import in the Output Window. Switch back to the Data Workspace and select the Tables explorer to see your imported data. | ||
+ | |||
+ | |||
+ | Double-click a table's name to open it in the Data Editor. | ||
+ | |||
+ | <br clear=all> | ||
+ | |||
+ | ==Create Virtual Tables from ODBC== | ||
+ | [[{{ns:file}}:importodbc5.png|450px|thumb|left|link={{filepath:importodbc5.png}}|Create Virtual Tables from ODBC]] | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | As well as, or instead of, importing the tables from your ODBC data source, you can have [[Virtual Tables]] automatically created for them. | ||
+ | |||
+ | |||
+ | Again, create a new database and make sure it is open. | ||
+ | |||
+ | |||
+ | Switch back to the Databases explorer, then select '''Create Virtual Tables from ODBC...''' from '''Additional commands''' or the right-click context menu. | ||
+ | |||
+ | <br clear=all> | ||
+ | |||
+ | [[{{ns:file}}:importodbc6.png|450px|thumb|left|link={{filepath:importodbc6.png}}|Create Virtual Tables from ODBC]] | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | Enter the name of your ODBC DSN or connection string in the dialog, specifying the username and password if required. | ||
+ | |||
+ | |||
+ | To only create Virtual Tables for specific tables, click '''Tables''' and make your selection. | ||
+ | |||
+ | |||
+ | To start the Virtual Table creation, click '''Import'''. | ||
+ | |||
+ | <br clear=all> | ||
+ | |||
+ | The Console Workspace will be selected to show the progress of the import in the Output Window. When you reselect the Data Workspace you will see your imported data. |
Revision as of 07:46, 26 April 2016
Under Construction
Contents
See Also
Overview
This article explains how to import Visual FoxPro databases and tables for reuse in your Lianja Apps.
Importing Databases
Visual FoxPro databases (.dbc files) can be quickly and easily imported into the Lianja format for use in your Apps. To import a Visual FoxPro database, select the Data Workspace and make sure no database is open. You then have two ways to import your database: drag and drop import or the Import VFP database command.
Drag and drop import
To use drag and drop import:
- Open the .dbc file location in Windows Explorer
- Click on the .dbc file and drag it into the Databases explorer in the Sidebar
To open your imported database. double-click its name in the Databases explorer or select Open in the right-click context menu.
If you double-click the database name, the Tables explorer will be automatically selected. You can switch between the explorers using the tabs at any time.
Use the Close option in the right-click context menu or under Additional commands to close the database.
Import VFP database command
To use the Import VFP database command:
- Using the right-click context menu or the Additional commands, click Import VFP database....
- Select your .dbc file from the popup Select a Visual FoxPro Database dialog.
To open your imported database, double-click its name in the Database explorer.
In the Tables explorer, double-click a table's name to open it in the Data Editor.
Each open table will appear in its own tab.
From the Lianja/VFP command window in the Console Workspace you can access your imported data using SQL statements or USE and other NoSQL commands.
Note that Lianja has automatically built the indexes for the imported tables.
Import ODBC database
If you have the Visual FoxPro ODBC Driver, you can also import databases this way, although it is more commonly used to provide developers with a local copy of SQL databases such as Microsoft SQL Server or MySQL.
Firstly, create a database and make sure it is open before starting the import
Switch back to the Databases explorer, then select Import ODBC database... from Additional commands or the right-click context menu.
Enter the name of your ODBC DSN or connection string in the dialog, specifying the username and password if required.
To only import specific tables, click Tables and make your selection.
To start the import, click Import.
The Console Workspace will be selected to show the progress of the import in the Output Window. Switch back to the Data Workspace and select the Tables explorer to see your imported data.
Double-click a table's name to open it in the Data Editor.
Create Virtual Tables from ODBC
As well as, or instead of, importing the tables from your ODBC data source, you can have Virtual Tables automatically created for them.
Again, create a new database and make sure it is open.
Switch back to the Databases explorer, then select Create Virtual Tables from ODBC... from Additional commands or the right-click context menu.
Enter the name of your ODBC DSN or connection string in the dialog, specifying the username and password if required.
To only create Virtual Tables for specific tables, click Tables and make your selection.
To start the Virtual Table creation, click Import.
The Console Workspace will be selected to show the progress of the import in the Output Window. When you reselect the Data Workspace you will see your imported data.