Page Index Toggle Pages: 1 [2]  Send Topic Send Topic Print Print
Hot Topic (More than 10 Replies) Is there a command line to Unload apps (Read 23869 times)
Bharat_Naik
Senior Member
Members
*****
Offline


Ever ready to learn and
share

Posts: 1202
Location: Chicago,  Illinois
Joined: Dec 16th, 2003
Re: Is there a command line to Unload apps
Reply #15 - Feb 27th, 2009 at 6:24pm
Print Post Print Post  
Can someone verify for me to see if UnloadApplication () command working?

I take one record, place in MassUpdate

UnloadApplication ("Med.db")

med.db is an external database mainly used for lookup data and it is loaded in server. Even after running the above command, Med.db (Listed in Server as "Med") is still loaded.

What am I doing wrong?
thanks.

  
Back to top
 
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: Is there a command line to Unload apps
Reply #16 - Feb 27th, 2009 at 6:39pm
Print Post Print Post  
Is Med.db located in your current working directory? If not, you need to use a path.
  

- Hammer
The plural of anecdote is not data.
Back to top
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: Is there a command line to Unload apps
Reply #17 - Feb 27th, 2009 at 6:39pm
Print Post Print Post  
Just tested it and it worked fine. Is it possible that someone has the application open in a client? Or maybe you should specify a file path, if it is not in your CWD?
  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
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: Is there a command line to Unload apps
Reply #18 - Feb 27th, 2009 at 9:18pm
Print Post Print Post  
When I Unload an application using Server Administration, it works fine. So, I believe, it is not other client using it. I have tried directory and even the full path but still it is not working.

I tried the following for so far.

UnloadApplication ("Med.db")
UnLoadApplication ("Data\Med.db")
UnloadApplication ("C:\Sesame2\Data\Med.db")

var vApplication as String = "Data\Med.db"

UnLoadApplication (vApplication)

Sad           Huh           Embarrassed      All at once!!!
  
Back to top
 
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: Is there a command line to Unload apps
Reply #19 - Feb 27th, 2009 at 9:26pm
Print Post Print Post  
I believe that the admin interface can unload apps, even in use (never do so!), but the SBasic command can't.
  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
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: Is there a command line to Unload apps
Reply #20 - Apr 13th, 2009 at 10:44pm
Print Post Print Post  
I cannot get the application to Unload even if I hard-code the command.

There are no clients connected to begin with. That is connected 0 of 4.  Several applications are loaded in the server.

I connect one Sesame Client with small application that has command button to Unload one of the loaded application, namely consult.db

UnloadApplication ("C:\Sesame2\data\consult.db")

or

UnloadApplication ("Consult.db")

or

UnloadApplication ("Data\consult.db")

Application is still loaded in the server. Obviously nobody is currently using it because only one Client is connected with the small application made specifically to unload the application.

What am I doing wrong?
  
Back to top
 
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: Is there a command line to Unload apps
Reply #21 - Apr 15th, 2009 at 2:45pm
Print Post Print Post  
So far we are having no luck duplicating your problem. I loaded an app using @XLookup from a client in a different app. I then dropped that client, so I then have no clients. I then connected another client (as the only client), loaded a small application, and used the UnloadApplication command in a button to unload the app loaded by the first client. It unloaded without difficulty.

Can you think of any circumstances that are different for you?
  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
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: Is there a command line to Unload apps
Reply #22 - Apr 15th, 2009 at 6:08pm
Print Post Print Post  
Thanks Mark for looking into this. I also looked at it further. Whenever my application freezes and I have to use hard re-boot or during power failure or system crash or undesirable interruption, there are 5 files that get locked including my main application namely Medical.db.  Other 4 files are Doctor.db, Consult.db, Med.db and Diagnosis.db. Rest of the files numbering to about 12-15 do not get locked but from them xloopups done regularly and they are loaded in server. These files can be successfully unloaded using sbasic command.

It is only those five files that invariably gets locked up on system crash, that I cannot unload using the sbasic command. Rest of them I can unload with the sbasic command. But then I seldom need to unlock those files that do not get locked!!

I understand the main database will get locked up on system crash. But why only those 4 external database  locks up and not the others. Why those 4 databases do not respond to sbasic Unloadapplication ( ) command? What should I do in my coding so, these 4 applications behave like the other external databases?

Thanks you for your help.

  
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: Is there a command line to Unload apps
Reply #23 - Apr 15th, 2009 at 7:51pm
Print Post Print Post  
Only thing different I see about these applications is that I have used them in the main form in global area in @XLookupSourceList ( ) or XResultset ( ) commands. I have made certain that the xResultset is closed properly.

  
Back to top
 
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: Is there a command line to Unload apps
Reply #24 - Apr 16th, 2009 at 3:01pm
Print Post Print Post  
The SBasic command UnloadApplication can't unload applications that have been touched by a "human" client (meaning loaded into the client's interface) and remains loaded because it is also touched by a "X" command, or have been touched by the XResultSet SBasic commands (which act like a "human" client). To unload application in either of these cases, use the administrative interface to ensure security and that that application is not actually in use by a human or "human-like" client.
  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged
 
Page Index Toggle Pages: 1 [2] 
Send Topic Send Topic Print Print