473,403 Members | 2,338 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,403 software developers and data experts.

Multiuser database access

cj
The program I just finished allows users to pull a set of records from
sql server and edit them. It is meant to be a one user system but it
makes me start thinking. Suppose two users use the program at the same
time. Both get the same starting set of data. Both users change the
same records but not the same way and they both save. I assume the last
one to save is the way the record will end up in sql server. Suppose
that is not correct. What do we do to ensure the second user gets an
error that that record has changed since they loaded it? Is there
record locking etc available in VB? How do programmers deal with this
these days?
Dec 7 '07 #1
4 1855
"cj" <cj@nospam.nospamschrieb
The program I just finished allows users to pull a set of records
from sql server and edit them. It is meant to be a one user system
but it makes me start thinking. Suppose two users use the program
at the same time. Both get the same starting set of data. Both
users change the same records but not the same way and they both
save. I assume the last one to save is the way the record will end
up in sql server. Suppose that is not correct. What do we do to
ensure the second user gets an error that that record has changed
since they loaded it? Is there record locking etc available in VB?
How do programmers deal with this these days?

http://msdn2.microsoft.com/en-us/lib...cz(VS.90).aspx

Armin
Dec 7 '07 #2
cj
Finally an article in MSDN I understand, although I think I'll have to
try a few things when I get back to the office next week.

Now this covered optimistic concurrency. Can we do pessimistic
concurrency in VB? Do you have a link to that?
Armin Zingler wrote:
"cj" <cj@nospam.nospamschrieb
>The program I just finished allows users to pull a set of records
from sql server and edit them. It is meant to be a one user system
but it makes me start thinking. Suppose two users use the program
at the same time. Both get the same starting set of data. Both
users change the same records but not the same way and they both
save. I assume the last one to save is the way the record will end
up in sql server. Suppose that is not correct. What do we do to
ensure the second user gets an error that that record has changed
since they loaded it? Is there record locking etc available in VB?
How do programmers deal with this these days?


http://msdn2.microsoft.com/en-us/lib...cz(VS.90).aspx

Armin
Dec 8 '07 #3
"cj" <cj@nospam.nospamschrieb
Finally an article in MSDN I understand, although I think I'll have
to try a few things when I get back to the office next week.

Now this covered optimistic concurrency. Can we do pessimistic
concurrency in VB? Do you have a link to that?
Armin Zingler wrote:
"cj" <cj@nospam.nospamschrieb
The program I just finished allows users to pull a set of
records from sql server and edit them. It is meant to be a one
user system but it makes me start thinking. Suppose two users
use the program at the same time. Both get the same starting
set of data. Both users change the same records but not the
same way and they both save. I assume the last one to save is
the way the record will end up in sql server. Suppose that is
not correct. What do we do to ensure the second user gets an
error that that record has changed since they loaded it? Is
there record locking etc available in VB? How do programmers
deal with this these days?

http://msdn2.microsoft.com/en-us/lib...cz(VS.90).aspx

No, can't provide a link. I'd ask in the ADO.Net group:
microsoft.public.dotnet.framework.adonet

A cross-language question, IMO.
Armin

Dec 8 '07 #4
Hello cj,

Pessimistic locking is not natively supported in ADO.NET. However, we can
achieve this type of locking through transactions. The following article is
a sample about it.
http://articles.techrepublic.com.com...2-1049842.html
[Pessimistic locking solves ADO.NET concurrency problems]

Hope this helps. If there is anything unclear, feel free to update here
again. We are glad to assist you.

Have a great day,

Best regards,
Wen Yuan
Microsoft Online Community Support
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

Dec 10 '07 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Pablo | last post by:
At my current job I've been tasked with maintaining a very old C++ application written largely in ANSI c++ in what I believe to be with an old DOS based Borland compiler. I'm trying to add a...
2
by: sdastouri | last post by:
I've been looking around on the internet and have noticed there are tons of Blog programs that support multiuser login written in PHP but there are none for ASP. I am just looking for a sample...
6
by: Mike Wiseley | last post by:
We recently converted our department wide shared Access97 database to Access2K. We used to be able to open various reports in design mode and make changes to the design (or create new reports) even...
2
by: marifusman | last post by:
Acees 2.0 application when user run application it give following error. The database is opened by user "Admin" on machine "abc". you can not open this database exclusively. Please help me...
16
by: Rob Geraghty | last post by:
I've just spent some time looking through FAQ sites and searching the google archives of this newsgroup, but I still haven't been able to find a clear explanation of an issue with multi-user...
0
by: s | last post by:
I need to develop a multiuser database application to be used by four people(The number of users are not likely to increase). It is for storing records of different versions of particular papers. I...
3
by: jofo | last post by:
Hello all, I am working on a multiuser access db. I want to have people login and then store their user information in an object. I want to store the information because it will be used in...
4
by: sumansengupta | last post by:
I created an access in access2003 , its being used in multiuser environment ..based on a particular value the database is automatically closed and only i can change the value. Even after the...
6
by: lukethegooner | last post by:
I would appreciate any comment. I want MS Access to act as a reporting tool accessing Oracle tables. The Oracle database is populated by another database application, but this application...
0
by: raamay | last post by:
I am new to VB.Net but since i have a good experience in VB6(having developed 2 to 3 desktop applications), i find no problem coping with the new environment at this stage. Well, i am planning to...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

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.