Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win


Developing Multi user application

Posted on 2002-03-24
Medium Priority
Last Modified: 2010-04-04

I am working with Delphi 5 enterprise and sql server7.
I am using ADO components for database connection.

There will be 4 to 5 user accessing the data simultaneously.

What all things I have to do so that all users gets all data, but if any user edits a record then that record should be no editable for other users.

I have no idea about developing multi user applications, so please explain to me what all things I must to ensure the quality of this multi user process.

Question by:princemahesh
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
  • 2
  • +4

Expert Comment

ID: 6893357
hi dear,

if you write the code for appendding or updating the table using "table1.append,table1.post" you must change this methode to write the commands using sql command for append or delete or update the table.

if you have problem with sql language i can send to you very simple example to your email.

thank you
LVL 22

Accepted Solution

Mohammed Nasman earned 150 total points
ID: 6893432

  there's a property of the ADO Table called LockType, and it have two values if you set it to  ltOptimistic then your record will lock when you call the post method, but if you set the LockType to ltPessimistic, then the record will lock when you edit the record

Best regards

Author Comment

ID: 6893498
Hi mnasman

I did that. I changed LockType to ltPessimistic but it still works in normal way.
It allows two user to edit and save the same records.

What I want to do is that if one user sets a record in edit mode then that record should be non editable for other users.

How can i get this work done?



Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

LVL 17

Assisted Solution

geobul earned 150 total points
ID: 6896486
In addition to mnasman's comment set:
CursorLocation := clUseServer;
CursorType := ctDynamic;

before opening the table.

Regards, Geo

Expert Comment

ID: 6935924
princemahesh, I would ask you to reject slsl_93002's proposed answer as it is not really an answer.  Since it is now a proposed answer, your question is in the 'Locked Questions' section and is not likely to attract any more experts.

slsl_93002, it is not common practice to post an answer as a first response.  You should first post a comment, then if you've answered the question, princemahesh can accept your comment as an answer.  If at all possible, emails should be avoided as this is a knowledge sharing site.  An email from you to princemahesh does not help anyone else learn.  You can refer to this page to answer questions on etiquette (last section): http://www.experts-exchange.com/jsp/cmtyQuestAnswer.jsp

Expert Comment

ID: 6975948
ADMINISTRATION WILL BE CONTACTING YOU SHORTLY.  Moderators Computer101 or Netminder will return to finalize these if they are still open in 14 days.  Experts, please post closing recommendations before that time.

Below are your open questions as of today.  Questions which have been inactive for 21 days or longer are considered to be abandoned and for those, your options are:
1. Accept a Comment As Answer (use the button next to the Expert's name).
2. Close the question if the information was not useful to you, but may help others. You must tell the participants why you wish to do this, and allow for Expert response.  This choice will include a refund to you, and will move this question to our PAQ (Previously Asked Question) database.  If you found information outside this question thread, please add it.
3. Ask Community Support to help split points between participating experts, or just comment here with details and we'll respond with the process.
4. Delete the question (if it has no potential value for others).
   --> Post comments for expert of your intention to delete and why
   --> YOU CANNOT DELETE A QUESTION with comments; special handling by a Moderator is required.

For special handling needs, please post a zero point question in the link below and include the URL (question QID/link) that it regards with details.
Please click this link for Help Desk, Guidelines/Member Agreement and the Question/Answer process.  http://www.experts-exchange.com/jsp/cmtyHelpDesk.jsp

Click you Member Profile to view your question history and please keep them updated. If you are a KnowledgePro user, use the Power Search option to find them.  

Questions which are LOCKED with a Proposed Answer but do not help you, should be rejected with comments added.  When you grade the question less than an A, please comment as to why.  This helps all involved, as well as others who may access this item in the future.  PLEASE DO NOT AWARD POINTS TO ME.

To view your open questions, please click the following link(s) and keep them all current with updates.

To view your locked questions, please click the following link(s) and evaluate the proposed answer.

*****  E X P E R T S    P L E A S E  ******  Leave your closing recommendations.
If you are interested in the cleanup effort, please click this link
POINTS FOR EXPERTS awaiting comments are listed in the link below
Moderators will finalize this question if in @14 days Asker has not responded.  This will be moved to the PAQ (Previously Asked Questions) at zero points, deleted or awarded.
Thanks everyone.
Moderator @ Experts Exchange
LVL 17

Expert Comment

ID: 7000587
Hi Moondancer,
I still think that mnasman's comment together with my additions should solve princemahesh's problem.

Regards, Geo

Expert Comment

ID: 7002270
I agree with geobul, setting the Cursor Location to the Server should solve the problem of locking records.

Author Comment

ID: 7005791
I aggre that setting those property will lock the record before posting.

But if suppose there are two users who are accessing the same record and one saves the changes first then when second user tries to save the record then system gives an error message that "The current reocrd has been updated sice you last read it."

Or suppose one user is modifing a record and other user deletes that record then again while saving that record first user will get the error.


Expert Comment

ID: 7035748
Once this collaboration is completed and the additional "what if" question  is handled that Mahesh just posted, let me know.

I'll be happy to split points to award those who helped.

Moondancer - EE Moderator

Expert Comment

ID: 7039910
princemahesh, what is the recordset's cursor location set to?  Client or server?  What is the Lock Type set to?

For your situation to be relieved, you will need to have the cursor location on the server and your lock type set to pessimistic.  Both properties must be present.  Also, make sure to check the cursor location after you have set the Active property to true as it will sometimes change the cursor location and type to whatever is available.

Expert Comment

ID: 9343225
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
Post your closing recommendations!  No comment means you don't care.
LVL 22

Expert Comment

by:Mohammed Nasman
ID: 9387900
points to geobul  and me

Expert Comment

ID: 9389087
I agree with mnasman, points to geobul and mnasman.

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…
Suggested Courses

636 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