?
Solved

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

Posted on 2007-12-01
8
Medium Priority
?
1,142 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
[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
8 Comments
 
LVL 15

Accepted Solution

by:
spprivate earned 1000 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 143

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
Get your Conversational Ransomware Defense e‑book

This e-book gives you an insight into the ransomware threat and reviews the fundamentals of top-notch ransomware preparedness and recovery. To help you protect yourself and your organization. The initial infection may be inevitable, so the best protection is to be fully prepared.

 
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 143

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

10 Questions to Ask when Buying Backup Software

Choosing the right backup solution for your organization can be a daunting task. To make the selection process easier, ask solution providers these 10 key questions.

Question has a verified solution.

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

Ever wondered why sometimes your SQL Server is slow or unresponsive with connections spiking up but by the time you go in, all is well? The following article will show you how to install and configure a SQL job that will send you email alerts includ…
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.

762 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