You could use another TTable, I guess.

----- Original Message -----
From: Leo Ramakers <[EMAIL PROTECTED]>
To: Multiple recipients of list database <[EMAIL PROTECTED]>
Sent: Wednesday, October 06, 1999 3:52 PM
Subject: [DUG-DB]: Testing if a Pardox record exists without moving the
cursor


> Is there a way to test if a record exists without moving the table cursor?
>
> I have a number of paradox tables, each with an index field. I have an
even
> handler on the related dataset OnStateChange which tests if the state is
> DSInsert, and if so it calls a generic 'NewRecord' handler. This emulates
the
> behaviour of the (otherwise buggy) autoincrement field, it reads a control
> counter, increments and saves it, and I use the new value for the new
record. I
> am trying to manage the situation when the counter wraps around to the
start
> number again, I want to test if a record of that number exists, and if so,
> increment and try again. I dont want to move the cursor for fear of
upsetting
> the insert process.
>
> Leo Ramakers
> Soft Option
>
>
>
> --------------------------------------------------------------------------
-
>   New Zealand Delphi Users group - Database List - [EMAIL PROTECTED]
>                   Website: http://www.delphi.org.nz

---------------------------------------------------------------------------
  New Zealand Delphi Users group - Database List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz

Reply via email to