cancel
Showing results for 
Search instead for 
Did you mean: 

How does the VALIDATE TABLE SQL statement report an error?

Breck_Carter
Participant
1,395

Does it raise an exception?

( or can someone tell me how to force an error? )

For example, the dbvalid.exe utility appears to run VALIDATE TABLE statements, and is able to determine "No errors reported"... how?

Accepted Solutions (1)

Accepted Solutions (1)

VolkerBarth
Contributor

Dbvalid might use sa_validate(), as that does return its success as text (with v17 adding a "bValid" bit to allow for language-agnostic success evaluation.).

Cf. that FAQ.

Breck_Carter
Participant
0 Kudos

The code for sa_validate() reveals that yes indeed, VALIDATE TABLE reports problems via raised exceptions, and also shows how to use CREATE PROCEDURE ON EXCEPTION RESUME to capture all the exceptions in a loop... thank you!

Answers (0)