Retreive the owner of a table or feature class

Discussion created by travisms on Oct 20, 2011
Latest reply on Oct 21, 2011 by jamesfreddyc
I'm trying to retrieve the owner of a particular feature class from a geodatabse (SQL Server) so that I may open that feature class using IFeatureWorkspace.OpenFeatureClass.  I establish a connection to the workspace using IWorkspaceFactory2.Open, specifying the SERVER and INSTANCE parameters in the PropertySet parameter.  The Spatial Database Connection dialog is displayed, I log in successfully as a user who is NOT the owner of the desired feature class, and then I need to open the feature class for use in my application.  But, I can't figure out how to get the fully qualified name of the feature class at that point, not knowing the owner.

I've tried using the IWorkspace.get_Datasets method to return an enumerator to use for iterating the collection and finding the feature class I'm looking for, but the get_Datasets call is EXTREMELY slow.

Is there something else I can do?  I can't assume to know the feature class owner's name, so hard coding that is not an option - it must be dynamic.