Normal Topic UnloadApplication (Read 528 times)
Amor
Full Member
Members
***
Offline


No personal text

Posts: 366
Location: Germany
Joined: Feb 7th, 2004
UnloadApplication
Jan 4th, 2012 at 1:47pm
Print Post Print Post  
Please i need Information how to use UnloadApplication.
wen my application (MDLAUFNAHME.DB) is loaded by one of the
X-Commands and has not been opened by a user.
i want to use UnloadApplication from the Form (MDLCHEMIE.DB) to unload the application (MDLAUFNAHME.DB)  from the server.
hier my Code :
unloadapplication("F:\Sesame2\Data\MDLAUFNAHME.DB")
unloadapplication("F:\Sesame2\Data\MDLCHEMIE.DB")

thank you for the help.

Dr. Belhareth
  

Dr. med. Amor Belhareth&&Medizin Labor &&Germany
Back to top
 
IP Logged
 
Bharat_Naik
Senior Member
Members
*****
Offline


Ever ready to learn and
share

Posts: 1202
Location: Chicago,  Illinois
Joined: Dec 16th, 2003
Re: UnloadApplication
Reply #1 - Jan 4th, 2012 at 11:14pm
Print Post Print Post  
Hi Amor,
I had problem with UnloadApplication command. Please refer to following link-
http://lantica.com/Forum4/cgi-bin/yabb2/YaBB.pl?num=1235342003/24#24

The answer to your query is in the last response in the above thread by Mark.  In short, UnloadApplication ( ) code does not work if xLookup or xResultSet command is used, that is my understanding.
  
Back to top
 
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: UnloadApplication
Reply #2 - Jan 5th, 2012 at 2:18pm
Print Post Print Post  
When loaded, an application has a flag indicating that the application is loaded because it was either loaded using the user interface (pulldown menus, tree, etc...) or was loaded using the XResult commands. UnloadApplication will not unload an application that has this flag set. In both cases, there is a high possibility that someone is still working with that application, so a human intervention is required to make sure that everyone is actually done.

Most of the "X" commands do not set the flag. This is because they are "discreet operations". This means that they load the application, do their work, and then are done - closing the application, all in one "command".

Human users and the XResultSet commands, may load an operation, perform many actions on that application, and it is unpredictable as to when they are going to be done. They are required to "close" the application to indicate completion.

Because many users or "X" commands can have an application open at a time, each loaded application also has a counter counting the number of "users" that have that application open. All of the "X" commands, and the user-interface of a client, increment this counter when opening and decrement it when closing. So, the discreet "X" command increment the counter when they start and decrement it before the command completes. The XResultSet commands increment on the commands (there are two) that open an application, and decrement on the command that closes an application. The user-interface increments when a client opens an application and decrement when they either close, switch applications, or exit the client.

If this counter is greater than one, when a close command arrives at the server, the server will not unload that application. It will simply decrement this counter, because there is some "user" still using that application.

There is a also a Sesame.ini file entry called "DATABASE RETENTION:" that causes Sesame server to retain a database as loaded, even after the counter has reached zero.
  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged