By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,264 Members | 1,079 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,264 IT Pros & Developers. It's quick & easy.

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

P: n/a
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!

Nov 21 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
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
<va****@comcast.net>
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!

Nov 21 '05 #2

P: n/a
Thank you Cor! You have been so helpful! How much do I owe you?
Cor Ligthert wrote:
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
<va****@comcast.net>
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!


Nov 21 '05 #3

P: n/a
Thank you Cor! You have been so helpful! How much do I owe you?


Nothing more than these words.

HTH

Cor
Nov 21 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.