Board index » delphi » Application.Terminate - remotely? (database application)

Application.Terminate - remotely? (database application)

I have several database programs that are being used on an NT network. In
order for me to make changes to the application code, I need all my users
to exit the program. Is there an easy way to build something in to my
program enable this function?

I'm sure I could use a timer to check some database field value on the
network and then call Application.Terminate, but is there an easier way?
Also, I don't need to worry about 'exiting gracefully'. The databases are
currently read only and won't cause any inconvenience if the user needs to
load the program again. Using D3, Apollo, FoxPro database, Win 98; any
suggestions greatly appreciated

Also posting this in Object Pascal forum.

 

Re:Application.Terminate - remotely? (database application)


Answered in the Object Pascal Forum
Quote
Antony Goddard wrote:
> I have several database programs that are being used on an NT network. In
> order for me to make changes to the application code, I need all my users
> to exit the program. Is there an easy way to build something in to my
> program enable this function?

> I'm sure I could use a timer to check some database field value on the
> network and then call Application.Terminate, but is there an easier way?
> Also, I don't need to worry about 'exiting gracefully'. The databases are
> currently read only and won't cause any inconvenience if the user needs to
> load the program again. Using D3, Apollo, FoxPro database, Win 98; any
> suggestions greatly appreciated

> Also posting this in Object Pascal forum.

Re:Application.Terminate - remotely? (database application)


A,

I can think of 2 ways to tackle this. Option 1 would be the preferred
method.

1. Have th users run a stub program. This program has a look at the
local copy of the exe and then compares that exe's info to a shared
central location. Should the central location be newer it copies it
local. The stub runs the local copy and then exits. You could then
make as many changes as you like. Copy the exe to the shared location
and then when a user has a problem they merely re-execute the stub. It
also means that you don't have to hassle all the users everytime you
make a change and everyone is automatically kept in sync. You will
need to enforce a policy regarding how often the user shuts the
application down, but that is easy to implement. If the app has been
running for more than a day etc.

2. You could send a UDP broadcast to all the apps and when they
receive this they shit down. This has a couple of issues. Your network
admin may not want you to do this. UDP is no gurantee that everyone
will get the message.

HTH's

On 13 Oct 1999 21:12:01 GMT, "Antony Goddard"

Quote
<Anto...@HughesSupply.COM> wrote:
>I have several database programs that are being used on an NT network. In
>order for me to make changes to the application code, I need all my users
>to exit the program. Is there an easy way to build something in to my
>program enable this function?

>I'm sure I could use a timer to check some database field value on the
>network and then call Application.Terminate, but is there an easier way?
>Also, I don't need to worry about 'exiting gracefully'. The databases are
>currently read only and won't cause any inconvenience if the user needs to
>load the program again. Using D3, Apollo, FoxPro database, Win 98; any
>suggestions greatly appreciated

>Also posting this in Object Pascal forum.

--Donovan

Donovan J. Edye  [www.edye.wattle.id.au/hobbies/prog/delphi/]
Namadgi Systems, Delphi Developer
Web: www.namsys.com.au
E-Mail: dono...@namsys.com.au
TVisualBasic := Class(None);

Re:Application.Terminate - remotely? (database application)


You could use a timer, but you could also put the code in the
application's OnIdle event. You could check a flag in a common
directory or even a Paradox file and then force an exit.

Steve F (Team B)

Other Threads