SET

Q:

In VFP, we typically configured the environment with SET commands at the beginning of the application and they maintained their values until the application was exited unless the data session changed.

Questions:

1. Where is the recommended place for SET commands to be issued in Lianja?

2. Does Lianja have the concept of multiple data sessions? If so, what causes the system to move between data sessions or instigate a new data session?

A:

in a desktop app, the SET commands would come in the App INIT delegate.

When you push the elipse on the row of the delegate the procedure name gets created for you.

re: DataSessions

No: there is only one.

And only one database is open at a given time.

If you need data from a different Lianja database (including VT’s the access remote databases, e.g., MSSQL or Lianja for that matter), using <database>!<table> in the Select or USE statement. That will leave the current database in place.

In monolithic apps it wasn’t unusual (but wasn’t usual either) to have more than one database. Because of two factors, this is not needed in Lianja:

1) Lianja apps are made to be small, functional apps the encapsulate a sub-set of functionality.

2) Processes that run as a result of other data changes can be spun off on their own OS process (using the SPAWN command) or, better yet from the perspective scalability, set off to web services (Lianja web services are insanely easy to create).

 

A2:

#1

For development purposes you can create a config.db in the .\Lianja\conf\ directory and put your SET commands there.

It is not per APP only.

#2
See: http://www.lianja.com/community/show…-data-sessions
and http://www.lianja.com/community/show…ESSION-in-v2-1


 

Advertisements
Categories SET

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s