Click here to Skip to main content
16,005,121 members
Home / Discussions / C#
   

C#

 
AnswerRe: How to auto detect row version, if some one update manually Pin
Luc Pattyn30-Dec-11 1:21
sitebuilderLuc Pattyn30-Dec-11 1:21 
GeneralRe: How to auto detect row version, if some one update manually Pin
Md. Marufuzzaman30-Dec-11 2:30
professionalMd. Marufuzzaman30-Dec-11 2:30 
GeneralRe: How to auto detect row version, if some one update manually Pin
OriginalGriff30-Dec-11 3:43
mveOriginalGriff30-Dec-11 3:43 
GeneralRe: How to auto detect row version, if some one update manually Pin
Luc Pattyn30-Dec-11 3:48
sitebuilderLuc Pattyn30-Dec-11 3:48 
AnswerRe: How to auto detect row version, if some one update manually Pin
jschell30-Dec-11 8:48
jschell30-Dec-11 8:48 
GeneralRe: How to auto detect row version, if some one update manually Pin
SledgeHammer0130-Dec-11 9:37
SledgeHammer0130-Dec-11 9:37 
GeneralRe: How to auto detect row version, if some one update manually Pin
jschell31-Dec-11 13:21
jschell31-Dec-11 13:21 
GeneralRe: How to auto detect row version, if some one update manually Pin
SledgeHammer011-Jan-12 8:08
SledgeHammer011-Jan-12 8:08 
jschell wrote:
First you can do that with several hundred clients an not significantly impact
any modern database on a reasonable database server as long as your polling is
reasonable.


If you are writing a POP3 client or something of that nature, a 10 minute poll is reasonable. If you are writing something like a stock ticker where real time updates are important, 10 minutes is certainly not reasonable. Stock tickers need to update at LEAST once per second. Still connecting directly to the database is generally a bad design.

jschell wrote:
Second if such a solution is needed at all the other possibilities are push or
pull (polling). And attempting to push from a database to many clients is not a
good idea.


I already said that pushing directly from the database is not a good idea Smile | :)

jschell wrote:
And of course with that description they wouldn't be able to do anything at all
with the database and thus the entire question would be pointless, so we can
suppose that that is not the situation.


Not at all. From the OPs question, it sounded like he is just randomly trying to fix problems as they come up without having a big picture design. Having your database accessible from outside the firewall is the worst idea ever. More so, in a REAL corporate environment, you can not connect
directly to the database from the client because security settings should not allow your app access to create users. So what happens in the real world (even in internal corp apps) is that only the database team has permissions to create / modify users, so you only get one database user (with db_datawriter and db_datareader only) and you have a server piece that connects to the DB using that user and all the clients connect to the server piece over some random port using TCP/IP, .NET remoting, web services or some other method and your app has a users table that it manages itself.

jschell wrote:
For most business models that is in fact entirely appropriate that the last
write wins because real (versus imagined) business scenarios almost always fit
that model.


jschell wrote:
Yes that is an excellent explanation of an imagined scenario. However most
businesses do not work like that. As per my previous example a customer doesn't
update a shipping address at the same time using two different addresses.


Completely and utterly false. Last write wins is only the "real world" scenario in your niave little world where everybody is nice and only one person is modifying a database record at one time Smile | :) . In the big boy world (again Smile | :) )... records can get written simultaneously all the time.

How's this for an "imagined scenario"?

Ever been to a doctors office recently? You know how they are all fancy and computerized now? So you get your examination or whatever and you leave the room. The doctor starts typing up notes about your appointment. At the same time you are talking to the receptionist to schedule your next appointment. Doc saves his notes. Ooops... now receptionist saves your new appointment date. You just stomped all over docs notes because receptionist is the last writer!!! OH NOOOO!!! you cut into his golf time!!! now he has to retype his notes and gets pissed at you!!

You could of course "lock" the record while it is being edited, but that won't really work in this scenario because 1) patient will be standing around waiting for doc to finish typing in his notes or 2) doc will stand around waiting for receptionist to finish scheduling your appointment

end result is that either patient or doc is not going to be happy.
GeneralRe: How to auto detect row version, if some one update manually Pin
jschell2-Jan-12 10:35
jschell2-Jan-12 10:35 
QuestionHelp me Convert this WPF to Silverlight Pin
Xarzu29-Dec-11 14:34
Xarzu29-Dec-11 14:34 
AnswerRe: Help me Convert this WPF to Silverlight Pin
Richard MacCutchan29-Dec-11 23:21
mveRichard MacCutchan29-Dec-11 23:21 
QuestionWould like help on technique to debug a dll Pin
turbosupramk329-Dec-11 12:09
turbosupramk329-Dec-11 12:09 
AnswerRe: Would like help on technique to debug a dll Pin
Pete O'Hanlon29-Dec-11 12:21
mvePete O'Hanlon29-Dec-11 12:21 
GeneralRe: Would like help on technique to debug a dll Pin
turbosupramk329-Dec-11 13:06
turbosupramk329-Dec-11 13:06 
GeneralRe: Would like help on technique to debug a dll Pin
harold aptroot29-Dec-11 12:30
harold aptroot29-Dec-11 12:30 
GeneralRe: Would like help on technique to debug a dll Pin
turbosupramk329-Dec-11 13:06
turbosupramk329-Dec-11 13:06 
GeneralRe: Would like help on technique to debug a dll Pin
harold aptroot29-Dec-11 13:30
harold aptroot29-Dec-11 13:30 
AnswerRe: Would like help on technique to debug a dll Pin
jschell29-Dec-11 14:12
jschell29-Dec-11 14:12 
GeneralRe: Would like help on technique to debug a dll Pin
turbosupramk329-Dec-11 15:44
turbosupramk329-Dec-11 15:44 
GeneralRe: Would like help on technique to debug a dll Pin
jschell30-Dec-11 8:21
jschell30-Dec-11 8:21 
GeneralRe: Would like help on technique to debug a dll Pin
OriginalGriff30-Dec-11 8:35
mveOriginalGriff30-Dec-11 8:35 
QuestionXML problem with retrieving value Pin
Cindy MCS29-Dec-11 8:34
Cindy MCS29-Dec-11 8:34 
AnswerRe: XML problem with retrieving value Pin
PIEBALDconsult29-Dec-11 8:58
mvePIEBALDconsult29-Dec-11 8:58 
GeneralRe: XML problem with retrieving value Pin
Cindy MCS29-Dec-11 9:34
Cindy MCS29-Dec-11 9:34 
GeneralRe: XML problem with retrieving value Pin
PIEBALDconsult29-Dec-11 9:56
mvePIEBALDconsult29-Dec-11 9:56 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.