Home > Back-end >  Ask a question about Delphi service
Ask a question about Delphi service

Time:10-06

With Delphi ServiceApplication wrote a service, connecting the oracle, but every time to restart, service faster than database is started, how to make the service such as oracle start after the start?
Online to see some people say that add dependent and TDependencies, but I tried, as if no matter use

Who has a solution?

CodePudding user response:

Delayed start,,

CodePudding user response:

To delay start, you can create a boot program, when after the completion of the service is started, you need to connect to the database.

CodePudding user response:

Services can be set depends on the relationship of each other. Your services can be set to rely on the database service

CodePudding user response:

There is no delay start win2003

CodePudding user response:

The top 3 floor,
In addition, there is no service returns? Determine the service launched, boot again.

CodePudding user response:

Start successively should not affect the normal process, if the database is turned off to open, can't service will need to restart to take effect?
This is completely avoided, the service should automatically connect to the database in a while,

CodePudding user response:

refer to the second floor shien00000xu response:
yes, delayed start, you can create a boot program, when after the completion of the service is started, you need to connect to the database,

What bootstrap, whether a service test database startup, if launched the restart another service? This scheme can realize, but can't use this method

CodePudding user response:

reference wr960204 reply: 3/f
services can be set depends on the relationship of each other. Your services can be set to rely on the database service

Which set? TDependencies, this method is invalid, and later, also can't see the interdependence in the service manager

CodePudding user response:

refer to 6th floor tcmakebest response:
start successively should not affect the normal process, if the database is turned off to open, can't service will need to restart to take effect?
This is completely avoided, the service should automatically connect to the database in a while,

Service start into the parameters to be read from the database, not read parameters can't start, after the completion of the start, no longer need to connect to the database

CodePudding user response:

references 9 f shuihan20e response:
Quote: refer to the sixth floor tcmakebest response:

Start successively should not affect the normal process, if the database is turned off to open, can't service will need to restart to take effect?
This is completely avoided, the service should automatically connect to the database in a while,

Service start into the parameters to be read from the database, not read parameters can't start, after the completion of the start, no longer need to connect to the database

Don't be so dull brain ah, can't read for the first time, that for one minute to read again, until success,
Every one hour to read, if the parameters are changed in the database, can automatically use the new configuration,
Understand?

CodePudding user response:

references to the tenth floor tcmakebest response:
Quote: references 9 f shuihan20e response:

Quote: refer to the sixth floor tcmakebest response:

Start successively should not affect the normal process, if the database is turned off to open, can't service will need to restart to take effect?
This is completely avoided, the service should automatically connect to the database in a while,

Service start into the parameters to be read from the database, not read parameters can't start, after the completion of the start, no longer need to connect to the database

Don't be so dull brain ah, can't read for the first time, that for one minute to read again, until success,
Every one hour to read, if the parameters are changed in the database, can automatically use the new configuration,
Understand?

Please give method, in which to write code to Execute? This seemingly executed only once, should write an infinite loop inside? I've tried seems to be no

CodePudding user response:

references to the tenth floor tcmakebest response:
Quote: references 9 f shuihan20e response:

Quote: refer to the sixth floor tcmakebest response:

Start successively should not affect the normal process, if the database is turned off to open, can't service will need to restart to take effect?
This is completely avoided, the service should automatically connect to the database in a while,

Service start into the parameters to be read from the database, not read parameters can't start, after the completion of the start, no longer need to connect to the database

Don't be so dull brain ah, can't read for the first time, that for one minute to read again, until success,
Every one hour to read, if the parameters are changed in the database, can automatically use the new configuration,
Understand?

To know the detailed, continue

CodePudding user response:

Delay some even database again,

CodePudding user response:

The
refer to 12 floor shuihan20e reply:
to know more, go on

So old posts, connect to the database failed, wait for a period of time after reconnection, it is too simple, dizzy

CodePudding user response:

reference 13 floor lhylhy reply:
delay some even database again,

I just want to know how to delay?

CodePudding user response:

On the 14th floor tcmakebest
reference response:
Quote: refer to 12 floor shuihan20e reply:

To know more, go on

So old posts, connect to the database failed, wait for a period of time after reconnection, it is too simple, dizzy

Yes, too simple, detailed, in the execute?

CodePudding user response:

reference 15 floor shuihan20e response:
Quote: refer to the 13th floor lhylhy response:

Delay again some database,

I just want to know how to delay?


reference 15 floor shuihan20e response:
Quote: refer to the 13th floor lhylhy response:

Delay again some database,

I just want to know how to delay?

sleep

CodePudding user response:

refer to 17th floor lhylhy response:
Quote: reference 15 floor shuihan20e response:

Quote: refer to the 13th floor lhylhy response:

Delay again some database,

I just want to know how to delay?


reference 15 floor shuihan20e response:
Quote: refer to the 13th floor lhylhy response:

Delay again some database,

I just want to know how to delay?

Sleep

Have you ever tried in service? nullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnull
  • Related