find primary key against database server table?

Hi All,

This has probably been done before, but I can't find it.  I'm trying to find a
way of getting the primary key fields for a table when the table is on a
database server using and ODBC connection.  I'd like it to be independant of
the brand of server (mssql,oracle,sybase,whatever).  I'm not adverse to using
bde calls.