473,657 Members | 2,921 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

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)...a ny thought on how
one might pull off such a system?

Thanks so much for any help!

Nov 21 '05 #1
3 1743
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)...a ny thought on how
one might pull off such a system?

Thanks so much for any help!

Nov 21 '05 #2
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)...a ny thought on how one might pull off such a system?

Thanks so much for any help!


Nov 21 '05 #3
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
3313
by: Mike Kennedy | last post by:
I have an XML Snippet <?xml version="1.0" encoding="UTF-8"?> and when I convert the entire xml file to a DOM and then generate a new file from the DOM, results in <?xml version="1.0"?>. Any thoughts? My sample code snippet is: DocumentBuilder builder = factory.newDocumentBuilder(); Document doc = builder.parse(in.xml); FileWriter file = new FileWriter(out.xml);
9
1966
by: Wally | last post by:
I am trying to display images from an Access 2000 database and I get an error "Invalid Parameter Used" when I execute the code line "picBLOB.Image = Image.FromStream(stmBLOBData)" in my Visual Basic .Net application. I have researched MSDN for help and found the example article 321900 (see below) and set up a test and everything works fine when I use SQL Server 2000 but when I modify the code and use data from Access 2000 using an...
5
1357
by: Deano | last post by:
When creating a record the user is asked to enter some description. They are free to enter anything they like (it's a text field). However I use the "/" as a separator when I append some extra text onto what the user has entered; e.g Ths is a note / My data The user has nothing to do with the "My data" string.
11
4836
by: simonmarkjones | last post by:
Hello there! I'm Still pretty new to access only been using it for a couple of days. If a record has been partially filled out or even completly filled out and then the form is closed or the user clicks to view an alternative record i do not want the values they had typed into that record to be saved. I only want the valuse to be saved if the user clicks my save button on my page.
1
3257
by: Benny Ng | last post by:
Hi,All, Export Method: ------------------------------------------------------------------------- strFileNameExport = "Results" Response.Clear() Response.Buffer = True Response.ContentType ="application/vnd.ms-excel" 'application/msword
3
2576
by: Arnold | last post by:
I am having problem loading the image from the database. It gives this error: "Invalid parameter used." This is my source code: Private abyt() As Byte Private fo As New OpenFileDialog Private sf As New SaveFileDialog Dim strCn As String = "Data Source=DATABASE\BARCA;" & _ "Initial Catalog=MIS;Integrated Security=SSPI" Dim cn As SqlConnection = New SqlConnection(strCn) Dim fs As IO.FileStream
0
1867
by: jeffmagill | last post by:
Hi Everybody, I'm really hoping that someone can help me out because I have spent too much time on this project already! Basically, I have a DetailsView that handles all the Edits for a GridView - each row has an edit button and clicking on this should trigger that record to be loaded into the DetailsView for editing. The problem is that the record never gets loaded into the DetailsView. Instead, the DetailsView always and only...
94
30270
by: Samuel R. Neff | last post by:
When is it appropriate to use "volatile" keyword? The docs simply state: " The volatile modifier is usually used for a field that is accessed by multiple threads without using the lock Statement (C# Reference) statement to serialize access. " But when is it better to use "volatile" instead of "lock" ?
4
10434
by: channau2 | last post by:
HI, i am trying to create a simple UDP client application on the windows mobile using c# to send messages as data packets to a desktop pc. I am getting this error when deploy the application on windows mobile; i am very new to windows mobile application development and this is partof my final year project. Can someone please give me some clues why i am getting this error? I need to solve this problem urgently the bit of code that...
0
8385
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8303
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8821
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8602
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6162
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5632
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4300
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2726
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1601
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.