View Full Version : Work with multiple tables

2015-03-05, 07:40

Migrate my system developed in VFP to Lianja. I can open and manipulate VFP tables in 32767 areas of work, allowing me to open multiple tables at once.
Lianja, how many areas of work have? How many tables can handle at once? There is a maximum limit?

Thank you very much.


2015-03-05, 10:49

I am not 100% positive but I believe it is 256.

Do you have an app that uses more than 256 table at the same time?



2015-03-05, 11:00
Hi Herb

you are correct it is 256 cursors (work areas).

2015-03-05, 11:01
Hi soft,

the answer is 254.

The rationale is that

a) in Lianja, you break your app up into functional units, creating what is called a composite app;

b) for each of these small, functional apps, 254 workareas is more than enough; and

c) apps that open even that many workareas will not scale well (think: 5,000 users)..

In the current VFP app I work with every day in some form or other, we open 37 cursors while opening just one of the mian forms. There are ways we can cut that back while still having all the information we need made available to the user. Over the past 13 years working on this app, we have made the forms simpler and simpler (while making the underlying data structure and business rules more complex), in response to user needs. We see Lianja as being in the direction we have been led by our users: make it simpler to use, while doing more behind the scenes.

This requires re-thinking your app: which given the advances in UI design (I didn't get a "how-to" manual with my smartphone, and neither did anyone I know with different phones), it makes sense to go with the flow, to meet the expectations of today's users, rather than what was common in 1994 when the VFP App UI was all the rage -- and yes, I was there, doing that. :)

Welcome to Lianja. It takes most folks time to learn to "think Lianja." But that's true for all development environments. I was pretty good with FoxPro, and then along came VFP: grokking OOP was a struggle, until it wasn't. The same has been true with Lianja, although exposure to OOP and to Python, etc., made the transition easier. Where I am still learning in Lianja has to do with all the possibilities that Lianja offers: it's one thing to be exposed to them, and another to know to use them in a given situation. That kind of context-sensitive recall comes with time: I'm still putting in my time, still learning more, all the time.


2015-03-05, 13:34
Thank you very much everyone for your responses. We usually got several open tables but not many. :)

2015-03-06, 14:16
Hi Barry,

I couldn't remember (nor find it searching on forum, googling, and looking on the system capacities page of the wiki), so I ran it from the console on opening Lianja with this:

close databases all
set exclusive off
open database southwind
ln = 0
do while .t.
lcAlias = juststem(tmpnam())
use employees again in 0 alias &lcAlias
? ln

and the last number printed was 254.

Hmm... LIST STAT actually shows 255, so I guess the last one opened, even though the 255th time threw an error (which I'll ticket).



2015-03-06, 21:13
Hi Hank,

Out if the 256 there are some reserved (hidden) ones at the end which cannot be used as they are used internally.

2015-03-07, 00:40