Solved

How to use MS Sql Server2000 Trigger event with C#.NET Window Application.

Posted on 2007-12-01
8
1,125 Views
Last Modified: 2013-12-16
I m developing a window application using C#.NET. I want to display the updated entry from MS SQL Server2000 database on the form using trigger in MS Sql Server2000. Can anyone tell me to catch the event that fired in SQL Server database (Trigger Event) when a new row insert. I want to use "Trigger reflection" in my C#.NET code so that i can display the updated database record without resending the request to database.
0
Comment
Question by:ddipro
8 Comments
 
LVL 15

Accepted Solution

by:
spprivate earned 250 total points
ID: 20387641
You cannot catch a database trigger in the client.To show updated records you have to hit the db every time.
0
 
LVL 142

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 20387827
I have to agree with spprivate, you cannot do that.
0
 

Author Comment

by:ddipro
ID: 20393636
Is there any other way to do that...?
0
NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

 
LVL 5

Expert Comment

by:ursangel
ID: 20394008
I hope,
The trigger will be fired either for an insert or update/delete of a record in the DB.
while doing that DB update if it is through a stored procedure. try to return back the rowset upadted as the result of the stored procedure. i think this will help you to some extend in re hitting the DB again.
0
 
LVL 142

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 20560724
TheLearnedOne:
unless you can come up with a suggestion how this could be implemented, you should revise your recommendation...
Last time I read the EE rules and guidelines, the <" No " can also be a correct answer> was still in there.
thanks for your time.
0
 
LVL 1

Expert Comment

by:Computer101
ID: 20592697
Forced accept.

Computer101
EE Admin
0
 

Expert Comment

by:Prutfugl
ID: 24096997
Have you considered SqlDependency or SqlCacheDependency?
0

Featured Post

Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

Question has a verified solution.

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

A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…

825 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