Difference between revisions of "Virtual Tables - Local Development, Remote Deployment"

From Lianjapedia
Jump to: navigation, search
(Created page with "''Under Construction'' ===See Also=== * Introduction to Virtual Tables * Syntax for the CREATE VIRTUALTABLE and ALTER VIRTUALTABLE Commands * V...")
 
Line 1: Line 1:
''Under Construction''
+
Lianja allows you to develop using virtual tables connected to local data, then - by setting the '''Runtime connection''' attribute for the App - to deploy your App to use an alternative connection available on the client.
===See Also===
+
 
 +
 
 +
==See Also==
  
 
* [[Virtual Tables|Introduction to Virtual Tables]]
 
* [[Virtual Tables|Introduction to Virtual Tables]]
Line 11: Line 13:
  
  
===Creating 'local' Virtual Tables===
+
==Introduction==
 +
In the example here we do the following:
 +
 
 +
* Use the '''Import ODBC database''' utility in Lianja to connect to an Oracle server via the Oracle ODBC Driver and import the 'hr' tables required by my App.  The utility also automatically creates virtual tables for these local copies.
 +
* Develop the App using the virtual tables, without needing to be connected to the Oracle server.
 +
* Set the '''Runtime connection''' on the App to the target client's Oracle DSN and set the App's '''Published''' flag to true.
 +
* Deploy the App
 +
 
 +
 
 +
==Create 'local' virtual tables==
  
 
[[{{ns:file}}:vt3_importODBC.png|450px|thumb|left|link={{filepath:vt3_importODBC.png}}|Import ODBC database]]
 
[[{{ns:file}}:vt3_importODBC.png|450px|thumb|left|link={{filepath:vt3_importODBC.png}}|Import ODBC database]]
  
  
 +
 +
Firstly, we need local Lianja copies of the target data (Oracle 'hr' sample here).  We can use the '''Import ODBC database''' utility for this via the Oracle ODBC Driver (32 bit).  In the Lianja App Builder, select the '''Data''' Workspace and create a new database or open the database you want to use.  Then select '''Import ODBC database''' from '''Additional commands'''.
  
 
<br clear=all>
 
<br clear=all>
Line 24: Line 37:
  
  
 +
In the '''Import ODBC Database''' dialog:
 +
* Specify the Oracle ODBC DSN and its associated Username and Password.
 +
* Check the '''Create Virtual Tables''' box to automatically create 'local' virtual tables for the imported tables.
 +
* Click the '''Tables''' button to display the available tables.
 +
* Check the required tables.
 +
* Click '''Import'''
 
<br clear=all>
 
<br clear=all>
  
Line 31: Line 50:
  
  
<br clear=all>
+
The '''Console''' Workspace will be selected automatically and the import progress displayed.  Once the import has completed, issuing the ''dir'' command in the Lianja/VFP command window displays the tables and virtual tables that have been created.  Note that the virtual tables have a ''connstr'' of 'local'.
  
  
===Develop Locally===
+
At this stage, the connection to the Oracle server is no longer required.
 +
 
 +
<br clear=all>
 +
 
 +
==Develop locally==
  
  
Line 40: Line 63:
  
  
 +
 +
Develop the App using the virtual tables.
 +
 +
 +
Remember to check the box next to the '''Published''' attribute for the App in '''Settings''' so that it will appear in the Lianja App Center and also to complete the settings for the App's [[Lianja App Center Tiles|App Center tile]].
 +
 +
 +
Finally, set the '''Runtime connection''' attribute to be the DSN or connection string the target client will use, including the authentication information if required.
  
 
<br clear=all>
 
<br clear=all>
Line 47: Line 78:
  
  
 +
 +
Create an Installer or other method of deploying the App.  The screenshot shows the files to be included for a local deployment.
  
 
<br clear=all>
 
<br clear=all>
  
===Deploy Remotely===
+
==Deploy remotely==
  
 
[[{{ns:file}}:vt3_deployedremotely.png|450px|thumb|left|link={{filepath:vt3_deployedremotely.png}}|Deployed App uses Remote Data]]
 
[[{{ns:file}}:vt3_deployedremotely.png|450px|thumb|left|link={{filepath:vt3_deployedremotely.png}}|Deployed App uses Remote Data]]
  
  
 +
 +
Once deployed, the App's virtual tables will use the '''Runtime connection'''.
  
 
<br clear=all>
 
<br clear=all>
  
 
[[Category:Developers Guide]]
 
[[Category:Developers Guide]]

Revision as of 08:17, 17 September 2014

Lianja allows you to develop using virtual tables connected to local data, then - by setting the Runtime connection attribute for the App - to deploy your App to use an alternative connection available on the client.


See Also


Introduction

In the example here we do the following:

  • Use the Import ODBC database utility in Lianja to connect to an Oracle server via the Oracle ODBC Driver and import the 'hr' tables required by my App. The utility also automatically creates virtual tables for these local copies.
  • Develop the App using the virtual tables, without needing to be connected to the Oracle server.
  • Set the Runtime connection on the App to the target client's Oracle DSN and set the App's Published flag to true.
  • Deploy the App


Create 'local' virtual tables

Import ODBC database


Firstly, we need local Lianja copies of the target data (Oracle 'hr' sample here). We can use the Import ODBC database utility for this via the Oracle ODBC Driver (32 bit). In the Lianja App Builder, select the Data Workspace and create a new database or open the database you want to use. Then select Import ODBC database from Additional commands.



Create Virtual Tables


In the Import ODBC Database dialog:

  • Specify the Oracle ODBC DSN and its associated Username and Password.
  • Check the Create Virtual Tables box to automatically create 'local' virtual tables for the imported tables.
  • Click the Tables button to display the available tables.
  • Check the required tables.
  • Click Import



Imported Tables and Local Virtual Tables


The Console Workspace will be selected automatically and the import progress displayed. Once the import has completed, issuing the dir command in the Lianja/VFP command window displays the tables and virtual tables that have been created. Note that the virtual tables have a connstr of 'local'.


At this stage, the connection to the Oracle server is no longer required.


Develop locally

Develop using Local Virtual Tables


Develop the App using the virtual tables.


Remember to check the box next to the Published attribute for the App in Settings so that it will appear in the Lianja App Center and also to complete the settings for the App's App Center tile.


Finally, set the Runtime connection attribute to be the DSN or connection string the target client will use, including the authentication information if required.



Deploy


Create an Installer or other method of deploying the App. The screenshot shows the files to be included for a local deployment.


Deploy remotely

Deployed App uses Remote Data


Once deployed, the App's virtual tables will use the Runtime connection.