DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 3 of 3

Thread: TRIGGER FROM DATABASE TO VISUAL BASIC

  1. #1
    MAGIC Guest

    TRIGGER FROM DATABASE TO VISUAL BASIC


    Hi!

    I am just a newbie in VB6 but I was already given a pretty heavy project.
    Therefore, I need all the help I can get. Here is the scenario: I need to
    create an interface that will get data from the database to be processed.
    Whenever there is a change in data from the table, there should be a way
    that my interface will know about it so I could get an updated recordset.
    The question is.. what do you think is the best way to do this? I see that
    it is not good to set a timer to read the table at certain intervals just
    to check if there were changes. I have read about triggers but it only triggers
    actions within the database like stored procedures, etc (Am I correct about
    this?).

  2. #2
    Narayana Pakala Guest

    Re: TRIGGER FROM DATABASE TO VISUAL BASIC


    "MAGIC" <rochie_perez@yahoo.com> wrote:
    >
    >Hi!
    >
    > I am just a newbie in VB6 but I was already given a pretty heavy project.
    >Therefore, I need all the help I can get. Here is the scenario: I need to
    >create an interface that will get data from the database to be processed.
    >Whenever there is a change in data from the table, there should be a way
    >that my interface will know about it so I could get an updated recordset.
    >The question is.. what do you think is the best way to do this? I see that
    >it is not good to set a timer to read the table at certain intervals just
    >to check if there were changes. I have read about triggers but it only triggers
    >actions within the database like stored procedures, etc (Am I correct about
    >this?).


    Hi
    You can use OLE automation interface to call a visual basic dll from a trigger
    when a table of interest to you gets updated.

    Look in SQL Server Books Online for more information: How to create an OLE
    Automation object.

    A good article is available at this link:
    http://www.fawcette.com/Archives/pre...t96/Extend.pdf

    Good Luck
    Narayana


  3. #3
    Terry Guest

    Re: TRIGGER FROM DATABASE TO VISUAL BASIC


    Hi,

    If my understanding to your query is correct, here is a possible way to go.
    You can still use a Store Proc to determine any changes to your table. Then,
    you can call a VB COM within your Storc Proc to interact with your vb program.
    You may use this approach for you reference and hope it helps!


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center