Board index » delphi » BDE-Callback on Indexerrors?

BDE-Callback on Indexerrors?

I would like to use the BatchMove component for an import function. This is
quite easy to use, but has the disadvantage off being not able to offer
events in order react during or after the import to possible errors.
Delphi offers for it the TBDECallBack object, which can used over the Create
method to indicate, to what event those to be registered callback function
shall react.
I ask myself the question which of the event types supplied by Delphi (e.g.
cbRESTRUCTURE, cbINPUTREQ) have to be used must, in order to react to
index-error. With index-error I mean for example key-violations, which
occur, if a key is already available or the to be imported table has no
adequate primary index and I therefor need the program to create one.
The primary index of my paradox target table is of the type LongInt, because
I was convinced by several postings in this newsgroup not to use AutoInc
fields.
Does it make sense to use TBatchMove in my situation or should I do
everything by hand (SQL)?
Does anyone have a better idea, how I could solve this problem?

Thank you for your trouble and hints in advance!
-
cya, space
--
PS: I would like to react also to other import errors, e.g. type violations,
and also to errors, which are so called "problems" (AbortOnProblem,
ProblemTableName), but I think, if I know how to cope with the index-errors,
I will find a solution for these problems too.
For your hints I would be nevertheless thankful.
---
e-mail: spa...@cityweb.de

 

Re:BDE-Callback on Indexerrors?


On Wed, 18 Aug 1999 13:01:30 +0200, "Stephan Plath"

Quote
<spa...@cityweb.de> wrote:
>I ask myself the question which of the event types supplied by Delphi (e.g.
>cbRESTRUCTURE, cbINPUTREQ) have to be used must, in order to react to
>index-error. With index-error I mean for example key-violations, which
>occur, if a key is already available or the to be imported table has no
>adequate primary index and I therefor need the program to create one.

As an alternative to using callbacks, you can use
TBatchMove.KeyViolCount and TBatchMove.KeyViolTableName.

If you want to use callbacks, it looks like the cbBATCHRESULT callback
is what you want (haven't used it myself).

Jan

Re:BDE-Callback on Indexerrors?


Quote
Jan Sprengers <j...@nospamplease.adm2000.be> wrote:
> As an alternative to using callbacks, you can use
> TBatchMove.KeyViolCount and TBatchMove.KeyViolTableName.

That's what I want to avoid.

Quote
> If you want to use callbacks, it looks like the cbBATCHRESULT callback
> is what you want (haven't used it myself).

--
cya, space
---
e-mail: spa...@cityweb.de

Other Threads