Solved

Stored procedures and multiusers

Posted on 2002-05-06
6
145 Views
Last Modified: 2010-04-04
First Question:
I am using interbase 6 with delphi 5. Now i want to create stored procedures for duplication checking and refrential integrity. I want to make some common stored procedure so that i can use one procedure for all the table. Is it possible? How?

Second Question:
With delphi 5 i am using sql server. To make my application multi uses what should i do. Any sites addresses or tips

answer asap :)
Rajni
0
Comment
Question by:rajniyadav
[X]
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
6 Comments
 
LVL 27

Expert Comment

by:kretzschmar
ID: 6993062
1. common is not possible, because the tables must be known at compile-time by the server, but you can do a stored-procedure for each table anbd change the name of the storedprocedure in your tstoredproc-object (if you use this)

2. the sql-server takes care of multiuser-access, no need to do something special (excepts your grants and userlogins)

meikl ;-)
0
 
LVL 7

Expert Comment

by:Motaz
ID: 6993063
Instead of stored procedure you can use Query and you can build it at run time such as:

ibQuery1.SQL.Text:= 'select * from ' + Edit1.Text;

Motaz
0
 

Author Comment

by:rajniyadav
ID: 6994249
kretzschmar

SQL server takes care of multiusers
but when we are running two application and two users are trying to modify the same record or when one user is modifying a record while some other user is deleting that record. Those kind of errors how to handle those.
0
Independent Software Vendors: 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!

 
LVL 27

Accepted Solution

by:
kretzschmar earned 150 total points
ID: 6994543
one user may have no luck and will get an exception thrown by the server forwarded through the connection-protocol to your application

SQL server takes care of multiusers,
doesn't matter if there are more users and/or applications accesses the same record, SQL server knows this, because all must go through the server

well there is a transaction issue,
depending on how you connect to the server (ado,bde,..).
but the default settings are normally useable.

meikl ;-)



0
 
LVL 3

Expert Comment

by:VSF
ID: 6996184
Second question about common store procedures this week!

VSF
www.victory.hpg.com.br
www.boatoda.hpg.com.br
0
 
LVL 1

Expert Comment

by:pnh73
ID: 9005096
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

Accept answer from kretzschmar

Please leave any comments here within the next seven days.
 
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
 
Paul (pnh73)
EE Cleanup Volunteer
0

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

Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

763 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