Wrox Programmer Forums
|
SQL Server 2000 General discussion of Microsoft SQL Server -- for topics that don't fit in one of the more specific SQL Server forums. version 2000 only. There's a new forum for SQL Server 2005.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Server 2000 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old January 25th, 2007, 10:50 PM
Registered User
 
Join Date: Jan 2007
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to ahloh
Default Events from SQL Server

Hi,

I am new to this forums and hope that someone might have come across this scenario:
1. I have to capture some TRIGGER events from one of the table in the sql server 2000. I have an active VB program that open a Serial Port (say COM 1).
2. I have no issue when data arrive at the port (event triggered captured).
3. However, when data arrived in SQL server table, I have no mean of getting the VB program to react based on the events. The VB supposed to get the data and process accordingly.
4. My question is: is there a way i can make the VB and sql Server to talk to each other based on events?

Thank you in advance.

 
Old February 28th, 2007, 10:46 PM
Friend of Wrox
 
Join Date: Aug 2004
Posts: 385
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I think you need to think about how VB and SQL interact. VB sends a request to SQL, SQL answers. On a trigger, it occurs just on SQL if there is not current VB connection or several VB connections how can SQL tell which VB session to do what. What you may want to do is have the SQL server put a file in a particual file path, then have the vb app check the existance of that file at an interval (say every minute). Thus the VB app can then do something that SQL tells it.

I think you also may get more help if you better explain what your trying to do....


 
Old March 1st, 2007, 04:43 AM
Registered User
 
Join Date: Jan 2007
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to ahloh
Default

Quote:
quote:Originally posted by robprell
  then have the vb app check the existance of that file at an interval (say every minute). Thus the VB app can then do something that SQL tells it.

I think you also may get more help if you better explain what your trying to do....
This will be equivalent to polling the db or file. This is not what i wanted. I wanted an interrupt sort of events from the SQL.
It need not have to come from trigger but i only wanted to capture that trigger "event". The preferred mode is the vb subscribed to some SQL events and when the event are trigger, the vb programm will be notified.

What i am trying to achieve here is to get the vb to process some data from the db when certain data arrive at a particular table. The vb will always be live and not close down cos it is listening to oncomm from the USB port for incoming data.

Hope there is some advice regarding this issue.

 
Old March 1st, 2007, 01:31 PM
Friend of Wrox
 
Join Date: Aug 2004
Posts: 385
Thanks: 0
Thanked 0 Times in 0 Posts
Default

If I understand what your trying to do I think you would have to have a vb app on the sql server. The sql event calls up the vb on the server and that vb app does something or calls some app on another computer. But for SQL to be the triggering event of a VB app I think your going to need to call up the VB on the SQL server from the command prompt useing something like the xp command shell functionality of SQL.






Similar Threads
Thread Thread Starter Forum Replies Last Post
Conflict in SQL Server 2000 and SQL Server 2005 ayan.mukherjee SQL Language 0 June 30th, 2008 03:34 AM
SQL Server Reg. SQL Server does not exist error Arsi SQL Server 2000 1 June 11th, 2008 11:20 AM
migrating from sql server 2000 to sql server 2005 abinashpatra SQL Server 2005 2 December 1st, 2006 03:45 PM
Viewing SQL Server Events Log(s) through .NET Ahmed_Kamran SQL Server 2000 1 December 30th, 2004 01:58 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.