?
Solved

Send trigger to VB Client app from SQL Server

Posted on 1998-08-25
7
Medium Priority
?
266 Views
Last Modified: 2008-02-01
I would like to notify administrators who are logged in to the server thru a VB client app when an insert is performed on a table using a server side trigger. Ideally i would like to send the inserted records to the clinet, but just notifying the app some how would be great.  How do i do this?  Thank you
0
Comment
Question by:emidiod
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
7 Comments
 
LVL 4

Expert Comment

by:mcix
ID: 1089747
Can you clarify notify?

I am not implying what you want to do is impossible, I am trying to understand what you want the trigger/VB app to do...
0
 
LVL 3

Accepted Solution

by:
altena earned 400 total points
ID: 1089748
Use COM:

In the trigger, create a com-object (one you wrote yourself)
The object can notify admins/everyone through all means
available. (E-mail for example, or it can raise an event in the
VB-app)
0
 

Author Comment

by:emidiod
ID: 1089749
Thanks Altena:
I have already started to create a server side out of process server which uses the winsock control.  I am also placing the winsock control in the client app.  If i create an out of process server on the SQL box i am hoping to instantiate it with sp_OACreate. I have not done this before so i am a little unsure...but i'm gonna try it.
0
NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

 
LVL 3

Expert Comment

by:altena
ID: 1089750
tnx for the grade.

Do yourself a favor: Spend some time on COM and DCOM

The winsock solution is faster to build, but more likely to
break under maintenance. (Trust me, I know...)
0
 

Author Comment

by:emidiod
ID: 1089751
I thought an out of process server was a COM object.  How can I communicate between remote apps without using the winsock control? Can i directly fire an event from the server to the client app?  Do you have any samples?
0
 
LVL 3

Expert Comment

by:altena
ID: 1089752
Its not easy, but not tooo difficult to.

SQL-Server ---> EventFiringObject(In exe-server)

VB-App --> EventReceivingObject(Same exe-server)

Whenever An event is fired, The exe server passes them on
to VB.

Contact me by e-mail if you need more help.
0
 
LVL 3

Expert Comment

by:altena
ID: 1089753
Memo to self:

Next time you tell someone to e-mail you, put down your e-mail
adress......


AltenaR@Yahoo.com
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Everyone has problem when going to load data into Data warehouse (EDW). They all need to confirm that data quality is good but they don't no how to proceed. Microsoft has provided new task within SSIS 2008 called "Data Profiler Task". It solve th…
JSON is being used more and more, besides XML, and you surely wanted to parse the data out into SQL instead of doing it in some Javascript. The below function in SQL Server can do the job for you, returning a quick table with the parsed data.
Via a live example, show how to backup a database, simulate a failure backup the tail of the database transaction log and perform the restore.
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.
Suggested Courses

770 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