PDA

View Full Version : Improved Virtual Table support



barrymavin
2013-10-01, 22:51
In the final build the "Import ODBC database" dialog now lets you choose what tables to import from a grid of selectable tables that is refreshed from the ODBC DSN when you click the "Tables" button.

So if there are only a few tables you want to work with in your Lianja Apps you can create a database and import them as "Virtual Tables".

See screenshot below.

467

phabio
2013-10-02, 03:31
Fanstatic, when it will be ready next beta to test?

yvonne.milne
2013-10-02, 05:01
Hi Fabio,

Daily build available for download from Windows/beta now.

Note: backup data before installation.

Regards,

Yvonne

phabio
2013-10-03, 06:20
with the example_virtualtable app opened, why this command fails?

use lookupTable connstr 'local' as select * from CUSTOMERS where CUSTOMERID = 'WILMK'

gio 3. ott 13:19:39 2013
**** Lianja error ****
use lookupTable connstr 'local' as select * from CUSTOMERS where CUSTOMERID = 'WILMK'
^
File 'LOOKUPTABLE' does not exist

yvonne.milne
2013-10-03, 08:30
Hi Fabio,

Try:


create virtualtable lookupTable connstr 'local' as select * from CUSTOMERS where CUSTOMERID = 'WILMK'

That's not the documented syntax for USE... CONNSTR - I'll check whether that should also be supported.

Regards,

Yvonne

phabio
2013-10-03, 08:42
if the connection string is not "local" but a real connection to a DB, work fine..
the problem is only with "local".
I try with your sintax.
thanks
Fabio

phabio
2013-10-04, 01:12
The "create virtualtable lookupTable " command, create a VT called "lookupTable" on the DB, thi is not that I want.
the command "use lookupTable connstr 'local' as select.." create a VT as "select ... to cursor"...

would be very useful if the command "use LOOKUPTABLE ConnStr 'local' as select ..." could work with remote tables if the ConnStr is != 'local' and local tables if is = 'local'... lyke into the "Create VT" on the DB menu.

hmischel@diligentsystems.com
2013-10-04, 10:38
Hi Phabio,

Sorry for the delay as I promised I would help you with some client/server architecture.

I think I see some of the confusion you may be having based on the code you sent me.

If I read correctly what you are doing, you are using a complex query across several tables to create a cursor with many conditional between statements and iif() statements.

My assumption is that you are using that cursor to drive your application.

Have you looked at creating a view on the backend server and then creating a virtualtable based on a select from that view?

The tricky part would be trying to update that data, but that may have to be accomplished with a SQLconnectstring()

I just am not sure you want to be pulling all your data to the front end to then try and limit what the user sees.
Herb

phabio
2013-10-10, 11:26
Ciao Herb,
yes, you're right, the View could definitely lighten the thing ..

But you can use "local" in the connection string would be very convenient .. ;)
but unfortunately you can not ..:(