The Table_GetSQLErrorText() function retrieves a block of SQL error text for the last SQL error that occurred. This function should be used only in the SQLError procedure.


Table_GetSQLErrorText(table_ID, error_text, native_error_ID)


table_ID – A long integer specifying the table for which SQL error text is being returned. Use the internal_table_ID value passed into the SQLError procedure.

error_text – A returned string containing the SQL error text.

native_error_ID – A returned long integer containing the native SQL error number.

Return value

An integer indicating whether SQL error text was retrieved. The constant STATUS_SUCCESS indicates error text was retrieved. Any other value indicates error text was not retrieved.


When a SQL error occurs, several blocks of SQL error text may result. When using the Table_GetSQLErrorText() function to retrieve the SQL error text, be sure to retrieve all of the blocks of error text. Otherwise, other applications won’t be able to properly retrieve SQL error text.

When using Table_GetSQLErrorText() to retrieve SQL error text, don’t use the naterr() function. These two functions are not compatible and shouldn’t be used together.

Documentation Feedback