PDA

View Full Version : Views Equivalent



rcahoon
2017-11-30, 03:58
Hi,

We have two very large VFP tables each of which has over 250 columns. In order to facilitate migration from our legacy platform to the Lianja platform we would like to retain the current database and table structures as much as possible. In our current system we use a large number of views to make working with these tables easier.

Does Lianja have an equivalent to local views?

Can we use virtual tables linked to local Lianja tables to provide the equivalent of updateable views?

I know that we can, of course, work directly with the tables and forgo local views so at this point I'm just trying to get a feeling for the Lianja design process.

Cheers,

Rob

josipradnik
2017-11-30, 04:31
Hi Rob,



Q:
Something like local view on VFP...
A:
A VT can be created against a local table. Just specify "local" as the ODBC Connection and enter a SQL statement.
Create a virtual table with a "local" DSN. That is proxied directly into the embedded database engine. It does not use ODBC nor talk to a remote server.

Search "local view" in: http://www.lianja.com/community/showthread.php?3117-Answers-Virtual-table for more info.

Josip

rcahoon
2017-11-30, 04:41
Josip,

Outstanding. :) Much Obliged.

Cheers,
Rob

josipradnik
2017-11-30, 04:57
Virtual Table is low ("V") in alphabet, and I've just started to publish new collected articles in [Answers], beginning from "A".

I can provide you a draft of future post about Virtual tables. It is not published on "Lianja developer", even not edited yet, but can help you with more recent info.
Link to download it as PDF: https://lianjadeveloper.files.wordpress.com/2017/11/lianjadeveloper-wordpress-com-virtual-tables.pdf

Josip

barrymavin
2017-11-30, 07:44
Rob,

Some additional info from the roadmap release notes.



Added a new attribute to the App Settings "Runtime database". This provides the ability to develop an App against "local" Virtual Tables (you can import these into a development database) and then when the App is generated as an HTML5 JavaScript Web/Mobile App the runtime database is used in production.



Added "Create Local Virtual Tables" to the database context menu. This causes a virtual table (name prefixed with vt_) to be created in the database for each native table and its connection string is set to "local".



"local" stored procedures are now supported for Virtual Tables. See this forum post (https://www.lianja.com/community/showthread.php?3767-Lianja-3-4-supports-quot-local-quot-stored-procedures)for details.