- @echo execute function task('print error', '%1') | dbaccess sysadmin 2>NUL
It takes advantage of one of the SQL Admin API commands introduced in IDS 11.10, PRINT ERROR, which will print the text for any error numbers:
Make sure IDS is online and grant connect permission to the sysadmin database for any user who runs it. Here are some examples of calling it:
(expression) A syntax error has occurred.
(expression) Explicit path name too long.
If that doesn't cut it and you want more fancy search capabilities, consider using the BTS extension.