PDOX5, OPAL, error trapping for index errors?

PDOX5, OPAL, error trapping for index errors?

Post by Br.Egidio Ko » Sun, 11 Jan 1998 04:00:00



I have to go through a table with a TCursor and process certain
records, then add them to another table and delete the originals.

Sometimes there may be an index error when adding to the second table.
In those cases I do not want the processed records do dissapear in no
mans land.

How can I trapp the error event: index error?

Thanks for any suggestion

Br.Egidio

Br.Egidio

 
 
 

PDOX5, OPAL, error trapping for index errors?

Post by Richard Cart » Mon, 12 Jan 1998 04:00:00


: I have to go through a table with a TCursor and process certain
: records, then add them to another table and delete the originals.

: Sometimes there may be an index error when adding to the second table.
: In those cases I do not want the processed records do dissapear in no
: mans land.

: How can I trapp the error event: index error?

if not tc.postRecord then
  errorshow("Would not post record " + string(tc.recNo()))
  quitLoop ;or return, or your error correcting measures
endif

Another approach would be to post the records to a table with
identical structure, but no indexes.  Then, when you add the
primary key again, some records will go to the :PRIV:KEYVIOL
table.  Edit them and add them to the keyed table.
--
============================================================

============================================================

 
 
 

PDOX5, OPAL, error trapping for index errors?

Post by Ray Majewsk » Mon, 26 Jan 1998 04:00:00


Try this:

if tc1.addRecord(tc2) then
    deleteRecord()
endIf


>I have to go through a table with a TCursor and process certain
>records, then add them to another table and delete the originals.

>Sometimes there may be an index error when adding to the second table.
>In those cases I do not want the processed records do dissapear in no
>mans land.

>How can I trapp the error event: index error?

>Thanks for any suggestion

>Br.Egidio

>Br.Egidio

 
 
 

1. Error Trapping - Can you trap a DTS Package error using SQLDMO running a job

I'm running a DTS pacakge by scheduling it through a job
in SQL DMO (I am doing it through DMO vs. DTS Object in
order to run the package on the server from a client pc).
I am having trouble finding info on how to retreive the
error messages if any of the packages fail.  I know I can
make an error log and look at that text file but for the
application purposes it would be a lot better to pull it
in through DMO, any suggestions on how to find the error
message?  I've looked a little into the Alert object but
don't fully understand how that might or might not help
me.  Thanks in advance,
Mike

2. CA Ships Ingres 1.1 - Press Release

3. Error Trapping: MS Access errors not trapped in VB code

4. Can anyone get Crystal Pro to work with Sybase stored procs?

5. trapping Unique index errors

6. online.log error message

7. VB error trapping of duplicates in indexed Access database

8. !US-IL-Chicago-N. Suburbs: Senior Oracle Contract Programmers Needed Immediately

9. How to trap error messages of @@error?

10. Errors that are trapped by @@ERROR

11. Trapping SQL error in VB before ADO raises run-time error

12. Trapping @@error - some errors terminate execution

13. error-scenarios that can not be trapped with @@error