Solved

How to update DbCtrlGrid on mysql database change?

Posted on 2004-08-25
7
300 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
  • 3
  • 3
7 Comments
 
LVL 27

Expert Comment

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

Author Comment

by:selas
Comment Utility
you mean timer?
0
 
LVL 27

Expert Comment

by:kretzschmar
Comment Utility
>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
Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 

Author Comment

by:selas
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
i added Dbctrlgrid1.PanelCount
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Suggested Solutions

Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

763 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now