Solved

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

Posted on 2007-12-01
8
1,120 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
Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

 
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

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

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 combined with referencing Books Online, show some of the information that can be extracted from the Catalog Views in SQL Server.
Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties

758 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now