Hi Dennis,
> > The way make sure that you have no deadlock problems is to
> > ensure that it's
> > never called from inside a transaction.
>
> And if you don't have a transaction ... you end up with missing numbers,
> partial orders, and worse still, more deadlocks. This is because
Yes, you can
> -Original Message-
> > In C/S, you do not normally request an exclusive lock. The
> first query
> > increments the field, and as the transaction is still
> pending, the server
> > will lock the record. If the record is already locked
> (because another
> > process is in the middle o
Comments below...
> Welcome to the world of C/S programming. You will need to use a
> transaction:
>
> TDatabase.StartTransaction;
> try
> TQuery.SQL.Text := 'update singleelementtable set
somefield=somefield+1';
> TQuery.ExecSQL;
> TQuery.SQL.Text := 'select somefield from singleelementta
age-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On
> Behalf Of Terry Johnson
> Sent: Friday, 11 February 2000 14:08
> To: Multiple recipients of list delphi
> Subject: [DUG]: A simple SQL question...
>
>
> Suppose you are wanting to insert an order into an
>When working with tables, you could use a single element database that was
>accessed exclusively, so that an open-read-increment-write-close procedure
>would handle it nicely.
>In migrating to an ADO/ODBC SQL interface, how would you achieve the same
>thing? The TQuery does not support the exclu
Terry
What Database?
Regards
Neven
- Original Message -
From: Terry Johnson <[EMAIL PROTECTED]>
To: Multiple recipients of list delphi <[EMAIL PROTECTED]>
Sent: Friday, 11 February 2000 14:08
Subject: [DUG]: A simple SQL question...
Suppose you are wanting to insert a
Suppose you are wanting to insert an order into an order database. The
first thing you need is a sequential order number.
When working with tables, you could use a single element database that was
accessed exclusively, so that an open-read-increment-write-close procedure
would handle it nicely.