Consistence in sequence of queries

Consistence in sequence of queries

Post by Eberhard Schefol » Fri, 31 Jul 1998 04:00:00



Stupid question, smart answer:

In my DAO application I have a small number of queries that I have to
perform sequentially at some point. They interrelate somewhat but can't be
combined into one.

How can I make sure no-one modifies an entry during this sequence? Do I
explicitly have to lock all tables involved? Or would a transaction
guarantee consistency? Or something else?

Thanks for your help!

 
 
 

Consistence in sequence of queries

Post by Coat » Fri, 31 Jul 1998 04:00:00


Using Transactions must be enough ...

--
Alberto Borbolla
Tecnologia en Sistemas
MEXICO

Replace "X" to send mail



Quote:> Stupid question, smart answer:

> In my DAO application I have a small number of queries that I have to
> perform sequentially at some point. They interrelate somewhat but can't
be
> combined into one.

> How can I make sure no-one modifies an entry during this sequence? Do I
> explicitly have to lock all tables involved? Or would a transaction
> guarantee consistency? Or something else?

> Thanks for your help!


 
 
 

1. DBGrid data consistence check

Hi,
I am using a DBGrid to present and to input data.
If the user enters a data record with some fields in a row,
and then leaves the row by typing 'Tab' or simply moving to another row,
the data record is stored by the BDE and, if something is wrong, an
exception
is thrown.
I would like to check the user input, before the BDE is doing it, and, if
something is
wrong, send the user back to the active row with an error message.
After searching a long time, I found that the TDataSource has an
OnUpdateData routine
where I can check the input before the exception comes up.
But how can I then make Delphi to cancel the update process and go back to
the
actual row?
(I found the possibility to close and open the query but that destroys the
whole row, which
is not very friendly to the user).

Thanks Jens

2. **Programmer***-PowerBuilder, Sybase, C / S - Contract in Brisbane, CA - Recruiter

3. How to run INSERT INTO with consistence violations

4. Setup of Centralized Subscriber / Centralized Publisher

5. Question regarding single sequence vs multiple sequences for surrogate key population

6. Link Remote Access Database through ODBC ?

7. Exploring sequences (sequence context within a tran saction)

8. Viewing|Watches EDBEngineError Object?

9. Oracle Sequence Query

10. Question regarding single sequence vs multiple sequences for surrogate key population

11. How to Create a query that generate a sequence number as a column

12. XPath Query returns elements in wrong sequence

13. Implementing sequences without sequences