Solved

Developing Multi user application

Posted on 2002-03-24
14
329 Views
Last Modified: 2010-04-04
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.

0
Comment
Question by:princemahesh
  • 4
  • 2
  • 2
  • +4
14 Comments
 

Expert Comment

by:slsl_93002
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
0
 
LVL 22

Accepted Solution

by:
mnasman earned 50 total points
ID: 6893432
Hello

  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
0
 

Author Comment

by:princemahesh
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?

Regards

Mahesh
0
 
LVL 17

Assisted Solution

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

before opening the table.

Regards, Geo
0
 
LVL 2

Expert Comment

by:header
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
0
 
LVL 1

Expert Comment

by:Moondancer
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.
http://www.experts-exchange.com/jsp/qList.jsp?ta=commspt
 
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.
http://www.experts-exchange.com/questions/Q.20178810.html
http://www.experts-exchange.com/questions/Q.20246239.html
http://www.experts-exchange.com/questions/Q.20255268.html
http://www.experts-exchange.com/questions/Q.20255242.html
http://www.experts-exchange.com/questions/Q.20269488.html
http://www.experts-exchange.com/questions/Q.20281446.html
http://www.experts-exchange.com/questions/Q.20283934.html

To view your locked questions, please click the following link(s) and evaluate the proposed answer.
http://www.experts-exchange.com/questions/Q.20145081.html
http://www.experts-exchange.com/questions/Q.20246789.html
http://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
http://www.experts-exchange.com/jsp/qManageQuestion.jsp?ta=commspt&qid=20274643
POINTS FOR EXPERTS awaiting comments are listed in the link below
http://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
0
 
LVL 17

Expert Comment

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

Regards, Geo
0
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.

 
LVL 2

Expert Comment

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

Author Comment

by:princemahesh
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.

Mahesh
0
 
LVL 1

Expert Comment

by:Moondancer
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
0
 
LVL 2

Expert Comment

by:header
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.
0
 

Expert Comment

by:CleanupPing
ID: 9343225
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.
0
 
LVL 22

Expert Comment

by:mnasman
ID: 9387900
points to geobul  and me
0
 
LVL 2

Expert Comment

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

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

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…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

757 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

21 Experts available now in Live!

Get 1:1 Help Now