Manage SQLServer C#
-
hi, i'm only starting with SQLServer 2005 the Questiuon is: i have an app (C#) that is a client(in two computers for now). Do i need to Create some sort of a Thread the will Re Fill my dataset or does it's managed by the server or maybe there's an Event that raises every time a Change is made ??? i'm confused THANKS :)
Have Fun Never forget it
-
hi, i'm only starting with SQLServer 2005 the Questiuon is: i have an app (C#) that is a client(in two computers for now). Do i need to Create some sort of a Thread the will Re Fill my dataset or does it's managed by the server or maybe there's an Event that raises every time a Change is made ??? i'm confused THANKS :)
Have Fun Never forget it
You don't need to create special threads. There is no event in your application when a database change occurs. Your client app cannot tell when the database is changed unless you build your own system that informs all clients.
Christian Graus - Microsoft MVP - C++ "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
-
You don't need to create special threads. There is no event in your application when a database change occurs. Your client app cannot tell when the database is changed unless you build your own system that informs all clients.
Christian Graus - Microsoft MVP - C++ "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
-
So you're saying that i need in the SQLSERVER himself some kind of an Event or ... to inform the clients can u refer me to an article about it? i've got lost searching in google and here THANKS :)
Have Fun Never forget it
No, I'm saying it doesn't work that way. You'd need to have the client that updates a table to send a broadcast message. Or, SS2005 lets you run .NET code, you may be able to do something with a trigger and a .NET class that sends a message in some way. Typically, tho, databases have never worked that way, it's never been the case that your client app can get a message to say that the DB has changed.
Christian Graus - Microsoft MVP - C++ "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
-
No, I'm saying it doesn't work that way. You'd need to have the client that updates a table to send a broadcast message. Or, SS2005 lets you run .NET code, you may be able to do something with a trigger and a .NET class that sends a message in some way. Typically, tho, databases have never worked that way, it's never been the case that your client app can get a message to say that the DB has changed.
Christian Graus - Microsoft MVP - C++ "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
-
Christian Graus wrote:
SS2005
yep i have it and thanks a lot i'll try to dig in further
Have Fun Never forget it
Maybe you could have a look at the SQLDependency-class, too. It's another way to inform your app that sth. changed on a specific table in your SQL Server 2005 database.