Code: Select all
Type type1 = Type.GetType("CoreLab.Oracle.OracleProviderFactory, CoreLab.Oracle, Version=3.50.11.0, Culture=neutral, PublicKeyToken=09af7300eec23701");
if (type1 == null) {
throw ADP.ConfigProviderNotInstalled();
}
FieldInfo info1 = type1.GetField("Instance", BindingFlags.Public | BindingFlags.Static | BindingFlags.DeclaredOnly);
if ((info1 != null) && info1.FieldType.IsSubclassOf(typeof(DbProviderFactory))) {
object obj1 = info1.GetValue(null);
if (obj1 != null) {
return true;
}
}
throw new Exception("The requested .Net Framework Data Provider's implementation does not have an Instance field of a System.Data.Common.DbProviderFactory derived type." );