Connecting Tech Pros Worldwide Forums | Help | Site Map

Concurreny help - flagging a record "being used" in client server environment

vanvee@comcast.net
Guest
 
Posts: n/a
#1: Nov 21 '05
Hi

I am trying to program a VB.Net Windows application (in a client server
environment with multiple users) and am seeking some help about a
possible technique to handle concurreny issues. I am using ADO.Net,
typed datasets, and data binding through code. Is there any way that
when a user pulls out a record (and this user could only pull one
record at a time) into his local dataset, that a flag can be sent back
to the server for that record, which will then in turn give a message
to any other user that "this file is being modified by another user"
and then allow them to view the record but make it read-only? I'm
thinking this could prevent any "after the fact" concurrency issues.
At the same time though, I realize it is only the user who pulls the
record who's machine knows that the record is being modified. Could I
perhaps write to another table a key field that the other computers
check? ....or maybe insert (the flag), then do a select again (but
this seems like a lot of unnecessary processing)...any thought on how
one might pull off such a system?

Thanks so much for any help!


Cor Ligthert
Guest
 
Posts: n/a
#2: Nov 21 '05

re: Concurreny help - flagging a record "being used" in client server environment


VanVee,

Have a look at optimistic an pesimistic concurrency. Because ADONET is
disconnected is pesimistic concurrency as you describe here (classic name
recordlocking) not easy to do.

You can have a look at these pages about this.

http://msdn.microsoft.com/library/de...cyChecking.asp

I hope this helps?

Cor


<vanvee@comcast.net>
[color=blue]
> Hi
>
> I am trying to program a VB.Net Windows application (in a client server
> environment with multiple users) and am seeking some help about a
> possible technique to handle concurreny issues. I am using ADO.Net,
> typed datasets, and data binding through code. Is there any way that
> when a user pulls out a record (and this user could only pull one
> record at a time) into his local dataset, that a flag can be sent back
> to the server for that record, which will then in turn give a message
> to any other user that "this file is being modified by another user"
> and then allow them to view the record but make it read-only? I'm
> thinking this could prevent any "after the fact" concurrency issues.
> At the same time though, I realize it is only the user who pulls the
> record who's machine knows that the record is being modified. Could I
> perhaps write to another table a key field that the other computers
> check? ....or maybe insert (the flag), then do a select again (but
> this seems like a lot of unnecessary processing)...any thought on how
> one might pull off such a system?
>
> Thanks so much for any help!
>[/color]


vanvee@comcast.net
Guest
 
Posts: n/a
#3: Nov 21 '05

re: Concurreny help - flagging a record "being used" in client server environment


Thank you Cor! You have been so helpful! How much do I owe you?
Cor Ligthert wrote:[color=blue]
> VanVee,
>
> Have a look at optimistic an pesimistic concurrency. Because ADONET[/color]
is[color=blue]
> disconnected is pesimistic concurrency as you describe here (classic[/color]
name[color=blue]
> recordlocking) not easy to do.
>
> You can have a look at these pages about this.
>
>[/color]
http://msdn.microsoft.com/library/de...cyChecking.asp[color=blue]
>
> I hope this helps?
>
> Cor
>
>
> <vanvee@comcast.net>
>[color=green]
> > Hi
> >
> > I am trying to program a VB.Net Windows application (in a client[/color][/color]
server[color=blue][color=green]
> > environment with multiple users) and am seeking some help about a
> > possible technique to handle concurreny issues. I am using[/color][/color]
ADO.Net,[color=blue][color=green]
> > typed datasets, and data binding through code. Is there any way[/color][/color]
that[color=blue][color=green]
> > when a user pulls out a record (and this user could only pull one
> > record at a time) into his local dataset, that a flag can be sent[/color][/color]
back[color=blue][color=green]
> > to the server for that record, which will then in turn give a[/color][/color]
message[color=blue][color=green]
> > to any other user that "this file is being modified by another[/color][/color]
user"[color=blue][color=green]
> > and then allow them to view the record but make it read-only? I'm
> > thinking this could prevent any "after the fact" concurrency[/color][/color]
issues.[color=blue][color=green]
> > At the same time though, I realize it is only the user who pulls[/color][/color]
the[color=blue][color=green]
> > record who's machine knows that the record is being modified.[/color][/color]
Could I[color=blue][color=green]
> > perhaps write to another table a key field that the other computers
> > check? ....or maybe insert (the flag), then do a select again (but
> > this seems like a lot of unnecessary processing)...any thought on[/color][/color]
how[color=blue][color=green]
> > one might pull off such a system?
> >
> > Thanks so much for any help!
> >[/color][/color]

Cor Ligthert
Guest
 
Posts: n/a
#4: Nov 21 '05

re: Concurreny help - flagging a record "being used" in client server environment


[color=blue]
> Thank you Cor! You have been so helpful! How much do I owe you?[/color]

Nothing more than these words.

HTH

Cor


Closed Thread