Solved

Multiple access

Posted on 1998-07-10
4
197 Views
Last Modified: 2010-03-19
What is the best way of handling multiple accesses to a table? I'm using C and the dbxxx (dbinit, dbopen, etc.)functions. I don't know how MS SQL deals with this. If two processes come in at the same time (or nearly so), does one get kicked out? Is there some sort of programmatic loop I can do on one of the dbxxx functions to keep trying rather than just failing?
0
Comment
Question by:flfmdll
  • 2
4 Comments
 

Accepted Solution

by:
clarkd earned 40 total points
ID: 1091726
ms sql server will handle the situation for you.  when two processes attempt to access the table sql server will first decide what process attempted to  access the table first.  if it can do so then sql server will give access to the first process and decide, based upon the type of process, wether or not the table can also be acessed by the second process or if it will need to stand in line and wait for the first process to end.
if sql server cannot determine wich process requested access to the table, sql will randomly select which process gets first access.

0
 

Author Comment

by:flfmdll
ID: 1091727
So it will not dump one process (return to the program with an error) and let the other process go through? So I don't have to do anything programmaticaly with MS SQL?

0
 
LVL 7

Expert Comment

by:spiridonov
ID: 1091728
Your secon process will either be 'queued' or allowed access: depend on the lock type used by the first process.
0
 

Author Comment

by:flfmdll
ID: 1091729
Thanks. I'll try this and see how it works.
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Suggested Solutions

Having an SQL database can be a big investment for a small company. Hardware, setup and of course, the price of software all add up to a big bill that some companies may not be able to absorb.  Luckily, there is a free version SQL Express, but does …
Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now