Solved

How to update DbCtrlGrid on mysql database change?

Posted on 2004-08-25
7
307 Views
Last Modified: 2010-04-05
How to update DbCtrlGrid on mysql database change?
Database is on server and i want:
if database on server something change
form on my computer maximizes
How to do it?
0
Comment
Question by:selas
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
7 Comments
 
LVL 27

Expert Comment

by:kretzschmar
ID: 11891532
i guess you have to poll in a defined intervall for changes
0
 

Author Comment

by:selas
ID: 11892153
you mean timer?
0
 
LVL 27

Expert Comment

by:kretzschmar
ID: 11892240
>you mean timer?
yep

maybe additional things must be done,
depending on the complexity of your database-design
-> means, if you have to monitor many tables,
you could define a trigger for each table,
which updates or insert a row into one table,
which you could then easily poll

meikl ;-)
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:selas
ID: 11892282
i added timer, but i don't know how to catch dbctrlgrid change
if something changed i need to maximize...
0
 
LVL 27

Accepted Solution

by:
kretzschmar earned 500 total points
ID: 11892552
well, of course,
the database does not tell you that something has changed.

you have to build some kind of logic, where you can detect
a change, but how depends on your compare-values you have,
where you could lookup (query).

tell a bit more

meikl ;-)
0
 
LVL 12

Expert Comment

by:Ivanov_G
ID: 11892606
you can use one more table in the DB. Let's say DB_CHANGES

DB_CHANGES
------------------------------------------
TABLE_NAME          IS_CHANGED

and you work with MY_TABLE.
write a trigger for MY_TABLE for AFTER insert, delete, update. When such event occur, you write in DB_CHANGES table.
and OnTimer you should execute this SQL:

SELECT * FROM DB_CHANGES
WHERE TABLE_NAME = 'MY_TABLE'
  AND IS_CHANGED = 1

then check if the DataSet is empty, and update this back to IS_CHANGED = 0. If the table MY_TABLE is changed, you can refresh the bigger DataSet attached to the DBGrid...
0
 

Author Comment

by:selas
ID: 11892868
i added Dbctrlgrid1.PanelCount
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question