Jump to content

Welcome to MSFN Forum
Register now to gain access to all of our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more. This message will be removed once you have signed in.
Login to Account Create an Account



Photo

Monitoring a MySQL database

- - - - -

  • Please log in to reply
1 reply to this topic

#1
mstester

mstester

    Newbie

  • Member
  • 25 posts
  • Joined 17-July 06
Hi all,

Is it possible to wirte some VB.NET code which can detect a change to a database i.e. something being added to a table or deleted?

If it is I would really appricated any pointers on how to go about this :)

Thanks in advanvce
They did give a million monkeys a million typewriters, it's called the internet.


How to remove advertisement from MSFN

#2
Phil Edwards

Phil Edwards
  • Member
  • 5 posts
  • Joined 09-July 07
Generally, you wouldn't want to do it that way. Most enterprise-level relational database software supports what are called 'trigger' functions. These are just little bits of code that you build into the database itself and which get fired when something specific happens, such as a row of data getting added to the database or an existing row getting updated.

You can use these trigger functions to do almost anything, but a typical usage would be to carry out some sort of sanity checking on the data being presented. By doing this job in the trigger function code, you end up with a more 'future proof' database, since it doesn't matter where the data is being presented to you from - it could be from a web-based app, from a command line prompt or from some DB management tool, it would all get validated in the same way. This keeps your data integrity rules where they belong, i.e. in the database itself and also means you don't have to re-code the validation every time you want to add a new interface between the data and the front end application.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users