DB-Library’s cursor routines call the Adaptive Server Enterprise’s catalog stored procedures to find out table formats and identify key columns.
See the Adaptive Server Enterprise Reference Manual.