Database exclusive???

Here is my code:
         table.EmptyTable;

         while not tableID.Eof do begin
               table.Insert;
               tableNAME.AsString := tableIdBIRTHNAME.AsString;
               tableLAST.AsString := tableIdLAST.AsString;
               table.Post;
               tableId.Next;
         end;

my table called "Table" is set at exclusive = true in the property.
The thing is how do I do that if someone access the database in the sametime as another person that the person who connects to the database doesn't do the code I wrote above???
forzaMeAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

kretzschmarCommented:
if you set the table exclusive,
then no one else can use the table
after you open it
until you close it

you may not able to set the table exclusive,
if some one already accesses the table

but i understand your question not really,
could you explain?

meikl ;-)
0
forzaMeAuthor Commented:
What I meant to say is that, I want that when someone opens up the program, the program normally does the code I wrote above, but if someone else has also opened the program in the sametime,I want a popup message saying that it wont do that code, I dont know if you get what I mean.
0
kretzschmarCommented:
begin
  table.exclusive := true;
  try
    table.Open;
  except
    Showmessage('Sorry, can''t do that yet');
    abort;  //silent exception -> leaves this codeblock
  end;
  table.EmptyTable;
  while not tableID.Eof do
  begin
    table.Insert;
    tableNAME.AsString := tableIdBIRTHNAME.AsString;
    tableLAST.AsString := tableIdLAST.AsString;
    table.Post;
    tableId.Next;
  end;
  table.close;
end;

just as suggestion,
there may also other ways

meikl ;-)

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
kretzschmarCommented:
go here

http://www.experts-exchange.com/jsp/cmtyQuestAnswer.jsp

read there the paragraph
How Do I Know What Grade to Give?

and explain why you give a c-grade

meikl ;-)
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Delphi

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.