SQLGetDiagField

Undocumented in source but is binding to Windows. You might be able to learn more by searching the web for its name.
extern (Windows)
SQLRETURN
SQLGetDiagField
(
SQLSMALLINT HandleType
,
SQLHANDLE Handle
,
SQLSMALLINT RecNumber
,
SQLSMALLINT DiagIdentifier
,
SQLPOINTER DiagInfo
,
SQLSMALLINT BufferLength
,
SQLSMALLINT* StringLength
)

Meta