Results 1 to 3 of 3

Thread: [Answers] SET

  1. #1
    Lianja MVP
    Join Date
    Dec 2012
    Location
    Croatia, Zagreb
    Posts
    1,135

    [Answers] SET

    Many of the SET commands work this way - you omit anything after the 'to' to set it back to the default.

    Code:
    set filter to



    ​All topics in [Answers] alphabetically:http://www.lianja.com/community/show...ll=1#post12352
    Last edited by josipradnik; 2017-01-20 at 03:42.

  2. #2
    Lianja MVP
    Join Date
    Dec 2012
    Location
    Croatia, Zagreb
    Posts
    1,135
    Q:
    If I do a select from a large table in the console and would like to kill it, can I use set escape?
    A:
    No, the query will need to complete. It is executed in the calling thread and control does not return to the main event loop until it has completed.



    ​All topics in [Answers] alphabetically:http://www.lianja.com/community/show...ll=1#post12352
    Last edited by josipradnik; 2017-01-20 at 03:42.

  3. #3
    Lianja MVP
    Join Date
    Dec 2012
    Location
    Croatia, Zagreb
    Posts
    1,135
    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




    All topics in [Answers] alphabetically: https://www.lianja.com/community/sho...ll=1#post13748

    These answers are also systematized on the site "Lianja developer": https://lianjadeveloper.wordpress.com/category/set/

Bookmarks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Journey into the Cloud
Join us