dq.getlasterror Function

Returns a string describing the most recent error encountered by a data quality object.

Category: Data Quality
Returned data type: Character
Note: The returned value is a string containing an error message.

Syntax

DQ.GETLASTERROR(<>)

Details

The dq.getlasterror function is a member of the data quality class. It returns an error message describing the most recent error encountered by a data quality object. The error might have occurred during invocation of any other data quality member function.

A best practice for programmers is to check the result code for each data quality call. If a result code indicates failure, use dq.getlasterror to retrieve the associated error message.

Example

dq dataq

   integer rc

   string errmsg

dataq = dq_initialize()

   rc = dataq.loadqkb("XXXXX")

  // an invalid locale name -- this will cause an error

 

   if (rc == 0) then

          errmsg = dq.getlasterror()

   // returns an error message