How to create a lan based Window application backend sql?
-
hi folks, i want a general idea of how to create a server-client environment in window application(c#.net). So what i am looking for is: 1. A sample mini project so far none found on google :mad: 2. what technology should i use udp/tcp/socket layer or something else. 3. how does client A gets notification of SQL update by client B ;when both are viewing/working on same table. So the record can get an auto refresh or something like that. Regards
-
hi folks, i want a general idea of how to create a server-client environment in window application(c#.net). So what i am looking for is: 1. A sample mini project so far none found on google :mad: 2. what technology should i use udp/tcp/socket layer or something else. 3. how does client A gets notification of SQL update by client B ;when both are viewing/working on same table. So the record can get an auto refresh or something like that. Regards
Don't make this too hard. I wrote one a few years ago and started like you are. I wanted PC-A to tell everyone else that it had just made a change. But the easy was is for each pc to monitor the db and find the changes on it's own. You don't need any network code to handle that. For me it could be a few minutes behind so it worked great.
-
hi folks, i want a general idea of how to create a server-client environment in window application(c#.net). So what i am looking for is: 1. A sample mini project so far none found on google :mad: 2. what technology should i use udp/tcp/socket layer or something else. 3. how does client A gets notification of SQL update by client B ;when both are viewing/working on same table. So the record can get an auto refresh or something like that. Regards
-
hi folks, i want a general idea of how to create a server-client environment in window application(c#.net). So what i am looking for is: 1. A sample mini project so far none found on google :mad: 2. what technology should i use udp/tcp/socket layer or something else. 3. how does client A gets notification of SQL update by client B ;when both are viewing/working on same table. So the record can get an auto refresh or something like that. Regards
If using SQL Server greater or equal to 2005 is an option you might want to consider employing SQL Server Notification Services[^]. There are also some sample applications on MSDN: SQL Server Notification Services Samples[^]. I hope this will help you. Regards,
— Manfred
"I had the right to remain silent, but I didn't have the ability!"
Ron White, Comedian
-
hi folks, i want a general idea of how to create a server-client environment in window application(c#.net). So what i am looking for is: 1. A sample mini project so far none found on google :mad: 2. what technology should i use udp/tcp/socket layer or something else. 3. how does client A gets notification of SQL update by client B ;when both are viewing/working on same table. So the record can get an auto refresh or something like that. Regards
Alok sharma ji wrote:
3. how does client A gets notification of SQL update by client B ;when both are viewing/working on same table. So the record can get an auto refresh or something like that.
That's usually not done; the normal way is to fetch the data and show the snapshot as it was on the moment of fetching. Updating "live" data moves the concurrency-problem from the database (where it was solved) into your app, where you need to solve it yourself. Simple example; you're editing a record, and the boss is editing the same one - you press "update" first. Now, how would you update the bosses record? Change the text in the textbox while he is editing/typing?
Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^]
-
If using SQL Server greater or equal to 2005 is an option you might want to consider employing SQL Server Notification Services[^]. There are also some sample applications on MSDN: SQL Server Notification Services Samples[^]. I hope this will help you. Regards,
— Manfred
"I had the right to remain silent, but I didn't have the ability!"
Ron White, Comedian
Manfred, have you ever used the notification service, I know we have never had to implement it and I am curious.
Never underestimate the power of human stupidity RAH
-
hi folks, i want a general idea of how to create a server-client environment in window application(c#.net). So what i am looking for is: 1. A sample mini project so far none found on google :mad: 2. what technology should i use udp/tcp/socket layer or something else. 3. how does client A gets notification of SQL update by client B ;when both are viewing/working on same table. So the record can get an auto refresh or something like that. Regards
Alok sharma ji wrote:
how does client A gets notification of SQL update by client B ;when both are viewing/working on same table.
That statement is a bit simple since it isn't a matter of working on the same table, since databases deal with that, but rather working on the same record (data) in the table. And that doesn't matter because it is very, very rare that there is an actual business case for that. For example when a order center takes a customer order only one employee is taking the order. The customer is making the same order on two different phones lines.
-
Manfred, have you ever used the notification service, I know we have never had to implement it and I am curious.
Never underestimate the power of human stupidity RAH
Mycroft Holmes wrote:
I know we have never had to implement it and I am curious.
I have been exclusively doing backend database driven stuff often in high demand environments and the only 'need' I have ever seen for this is when some developer claims that it "could" happen. Analyzing actual business cases and actual usage has never demonstrated a need.
-
Mycroft Holmes wrote:
I know we have never had to implement it and I am curious.
I have been exclusively doing backend database driven stuff often in high demand environments and the only 'need' I have ever seen for this is when some developer claims that it "could" happen. Analyzing actual business cases and actual usage has never demonstrated a need.
That has been my experience except I'm the developer so it has never happened, every now and then I have to slap a BA who suggests it to the users.
Never underestimate the power of human stupidity RAH
-
Alok sharma ji wrote:
3. how does client A gets notification of SQL update by client B ;when both are viewing/working on same table. So the record can get an auto refresh or something like that.
That's usually not done; the normal way is to fetch the data and show the snapshot as it was on the moment of fetching. Updating "live" data moves the concurrency-problem from the database (where it was solved) into your app, where you need to solve it yourself. Simple example; you're editing a record, and the boss is editing the same one - you press "update" first. Now, how would you update the bosses record? Change the text in the textbox while he is editing/typing?
Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^]
i think i will just put an edit lock for client 2 if client 1 is working on same table.
-
1. Simple Client-server Interactions using C#[^]. 2. see 1. 3. more research needed.
Use the best guess
are you sure big DB data can travel through sockets ??
-
are you sure big DB data can travel through sockets ??
-
That has been my experience except I'm the developer so it has never happened, every now and then I have to slap a BA who suggests it to the users.
Never underestimate the power of human stupidity RAH
Indeed I always heard the rumors of SQL notification to subjugate LAN as RTS but caching one is like "fools gold".
-
Any type of data can travel through sockets; how do you think the internet, database systems etc work?
Use the best guess
can you re-create the given sample for a simple test table in sql, yesterday one of my friends told me to just share connection string path to server as one approach to do the thing ; But will it be on the same performance with socks?
-
can you re-create the given sample for a simple test table in sql, yesterday one of my friends told me to just share connection string path to server as one approach to do the thing ; But will it be on the same performance with socks?