CDaoTableDef.GetIndexInfo fails with ODBC Sybase SQL Anywhere
I want to find out the primary key in a table which is connected via
Dao and ODBC.
The CdaoTableDef.GetIndexInfo() call succeed with the option
AFX_DAO_PRIMARY_INFO but fails with the option AFX_DAO_SECONDARY_INFO!
But the information about the primary key is only provided with the
option AFX_DAO_SECONDARY_INFO.
Here is what I have done:
// CDaoTableDef src is open...
// the first index (i=0) exists ...
CDaoIndexInfo indexinfo;
src.GetIndexInfo(i, indexinfo, AFX_DAO_ALL_INFO); // fails with error
// ?Can't set this property for remote objects. (Error 3365)
(when I debug the MFC, I find out that the call get_Primary() fails,
while the call get_Unique() succeeds.)
Thanks in advance
Klaus