I'm trying to fill DataRelation collection by information, read from database.
DataTable schemaTable =
oleconnection.GetOleDbSchemaTable(
OleDbSchemaGuid.Foreign_Keys,
new object[] { null, null, tablename });
But this info doesn't say anything about is it real foreign key constraint or just relation and, because of this, I don't know what value to set for the fourth parameter of DataRelation constructor (createConstraints).
public DataRelation(
string relationName,
DataColumn[] parentColumns,
DataColumn[] childColumns,
bool createConstraints
)
Particularly, in MS Access one could connect two tables with relation but not enforce data integrity check. Some additional research showed that such unenforced relations appear in OleDbSchemaGuid.Referential_Constraints schema table too.
I am wondering where can I get required information. Please show me the way.