Link to home
Start Free TrialLog in
Avatar of princemahesh
princemahesh

asked on

Developing Multi user application

Hi

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.

Avatar of slsl_93002
slsl_93002

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
ASKER CERTIFIED SOLUTION
Avatar of Mohammed Nasman
Mohammed Nasman
Flag of Palestine, State of image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of princemahesh

ASKER

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?

Regards

Mahesh
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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): https://www.experts-exchange.com/jsp/cmtyQuestAnswer.jsp
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.
https://www.experts-exchange.com/jsp/qList.jsp?ta=commspt
 
Please click this link for Help Desk, Guidelines/Member Agreement and the Question/Answer process.  https://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.
https://www.experts-exchange.com/questions/Q.20178810.html
https://www.experts-exchange.com/questions/Q.20246239.html
https://www.experts-exchange.com/questions/Q.20255268.html
https://www.experts-exchange.com/questions/Q.20255242.html
https://www.experts-exchange.com/questions/Q.20269488.html
https://www.experts-exchange.com/questions/Q.20281446.html
https://www.experts-exchange.com/questions/Q.20283934.html

To view your locked questions, please click the following link(s) and evaluate the proposed answer.
https://www.experts-exchange.com/questions/Q.20145081.html
https://www.experts-exchange.com/questions/Q.20246789.html
https://www.experts-exchange.com/questions/Q.20281038.html

*****  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
https://www.experts-exchange.com/jsp/qManageQuestion.jsp?ta=commspt&qid=20274643 
POINTS FOR EXPERTS awaiting comments are listed in the link below
https://www.experts-exchange.com/commspt/Q.20277028.html
 
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.
Moondancer
Moderator @ Experts Exchange
Hi Moondancer,
I still think that mnasman's comment together with my additions should solve princemahesh's problem.

Regards, Geo
I agree with geobul, setting the Cursor Location to the Server should solve the problem of locking records.
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.

Mahesh
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
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.
princemahesh:
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 
EXPERTS:
Post your closing recommendations!  No comment means you don't care.
points to geobul  and me
I agree with mnasman, points to geobul and mnasman.