How to check errorcodes

In case the errorcode potentialy raised by a command has to be analyzed and one value might lead to a special logic and all other values shall raise the normal errorexit this can be achieved easily as follows:

If Errorcode = TdOdbcNotFound Then
  . . . .
Else
  Reraise
Endif

The reraise command results in the effect that TradeDesign is assuming the Errorcode has not been analyzed with the consequence that calling another routine or leaving the current routine will issue an errorexit when Errorcode holds a positive value.