Home > Back-end >  There are familiar with Delphi MYSQL operation?
There are familiar with Delphi MYSQL operation?

Time:10-24

I have A connection to the MySQL database program, if there is A field in the table 'Age' change. After the program is there any way to know A field Age has produced A change?

CodePudding user response:

What has changed? Use the trigger?

CodePudding user response:

Are there any specific instances, that is, one the value of the field after the change, program A timely know the change.

CodePudding user response:

refer to the second floor weixiaohua response:
is there any specific instance, means that A field value changes, A timely know the change program.

Have arbitrary SQL Server, you can perform external programs, and trigger can know the value of the field in time change, can start the program again in the trigger A (when there is A process of two), and specify A command line parameters, after startup program A detected the parameter, to the previously existing applications A send A custom message and then close it (only one process), the previous program A response message can know the changed in time,

But the MySQL do not know to have the corresponding function can launch process,

CodePudding user response:

If so that it is too much trouble..

CodePudding user response:

reference 4 floor weixiaohua response:
if so that it is too much trouble..

To implement very simple, just afraid of MySQL without starting the process function,

CodePudding user response:

That you only know how to read out more, let the database instead of notify you a value has changed more troublesome,

CodePudding user response:

May want to use the trigger and the SOCKET,
Trigger the event message sent, A program through A SOCKET to accept, once has the news, to deal with,

CodePudding user response:

What is your application scenario? Why do you want to notify your database data has changed,

It is ok to refresh your application?

CodePudding user response:

Periodically, or use a trigger to call external programs

CodePudding user response:

I will only some basic operations, but is making a thorough study of

CodePudding user response:

Use MyDac controls, if there is a trigger

CodePudding user response:

1, the trigger to cooperate, that is to say the AGE changes triggered when a table or other state changes, such as in short they can determine the AGE have change,
2, use the program A timing to scan the change, if it will relax time real-time demand is not high, if the demand is higher, suggested time not less than 10 seconds,

It is recommended to use a table to record other changes, can monitor the change of the form, more

CodePudding user response:

I think this should be related to the Socket, and stopped if is to modify the operation, then, I couldn't write specific code,

CodePudding user response:

There is a little haven't understand: who is the manipulation of the database?

1. Your own program control alone,
2. Program jointly with others, but can be mutually agreed,
3. Is someone else in control, and can't communicate,

If the first case, that the problem is, every time write database all know nature, the second case, you can write a common interface, the problem does not exist, is the third?
  • Related