package AdaBase is
   subtype TSqlState is String (1 .. 5);
end AdaBase;

TSqlState function
AdaBase.Driver.Base.[DB].last_sql_state ()

This function returns the SQLSTATE error code regarding the last operation performed by the database handle. The SQLSTATE is a 5-character alphanumeric identifier defined in the ANSI SQL standard.


Boolean function
AdaBase.Statement.Base.[STMT].last_sql_state ()

This function returns the SQLSTATE error code regarding the last operation performed by the statement handle.

</br>

See last driver message and stmt discard rest for usage examples.


[DB] is "MySQL.MySQL_Driver", "PostgreSQL.PostgreSQL_Driver", or "SQLite.SQLite_Driver"

[STMT] is "MySQL.MySQL_statement", "PostgreSQL.PostgreSQL_statement", or "SQLite.SQLite_statement"

See Also