Vb6 how can I continuously check of new insertions in table and display notification
I need to check a table for new insertion continuously. If there are new insertions, a notification (or a message box) should pop up in the software. I am using vb6 with sql server (both 2000 & 2008). If I create a trigger, would I be able to access its results in the program?. tanks
Re: Vb6 how can I continuously check of new insertions in table and display notificat
Many ways to accomplish that...here is one:
- create "temp" table with one/two fields
- create trigger (on insert) on your main table that gets new records
- on every new insert trigger will write to the "temp" table whatever (ID, Name, etc)
- in vb I would have a timer and every so often check the "temp" table and display whatever you need to the user
- then delete everything from the "temp" table
... but like I said there are many ways ...
Re: Vb6 how can I continuously check of new insertions in table and display notificat
If I have multiple instance of software running, how can i delete until all of them have got the data
Re: Vb6 how can I continuously check of new insertions in table and display notificat
What do you mean "all of them have got the data "? You only have one database so before attempting to create new record check destination table if record already exists.
There are lots of things to consider when developing multi user system (if that's your main concern).
Re: Vb6 how can I continuously check of new insertions in table and display notificat
My software will be running from many pcs at the same time. Therefore if one of the instance gets the new data from the temp table, it will delete that data(lie you said). If that happens, others will not be able to read it.