HomeActive Query BuilderHow tp remove field's particular key constraint

How tp remove field's particular key constraint


Hi,
How cani i remove the particular field's key constraint?

ex. I am having the field AccountID (foriegn key). While adding this table and this primary key table in Querybuilder window i don't show the link for this field.

Kindly let me know your thoughts.
Srinivasan Mani | email
May 12 2009, 03:50 AM
Anybodies reply for this, urgent...
Srinivasan Mani | email
5 hours, 31 mins since original post
Dear Srinivasan,

You should find the primary object in the metatata container and remove the link.

MetadataObject mo;
mo = queryBuilder.MetadataContainer.FindObjectByName('main_table');
if (mo != null) {
for (int i = mo.Relations.Count-1; i >= 0; i--) {
if (mo.Relations[i].ChildNameStrNotQuoted == 'foreign_table') {
mo.Relations.Delete(i);
}
}
}

Hope this helps.
Sergey Smagin | email
1 day, 1 hour since original post
This topic is closed