Hi guys,
Having a really aggravating problem using Managed Metadata in SP2010 where I can get a Taxonomy Session, Term Store and Term set fine, but when I try to retrieve a term from the term set, I get a TermStoreOperationException which says that it "failed to read from or write to database".
Does anyone have any idea as to why I can get the Term Set but not the terms? I can't quite understand why when they all reside in the same database I can get the set but not the terms within it.
The code I'm using is below:
TaxonomySession txSession = new TaxonomySession(site, true);
TermStore termStore = txSession.DefaultSiteCollectionTermStore;
TermSet termSet = termStore.GetTermSet(TermSetId);
TermCollection termCollection = termSet.GetTerms("My Term", true); //exception thrown on this line.
Any ideas or insight or solutions would be really appreciated.
Thanks heaps!