The corporate library problem

Are we using Enterprise Library 6.0 and the following code to create a database instance and execute a stored procedure? Any help is greatly appreciated. Thanks in Advance.

 DatabaseProviderFactory factory = new DatabaseProviderFactory();
             Database  db = factory.CreateDefault();

 DbCommand dbCommand = db.GetStoredProcCommand("ProcedureName");

                OracleParameter outval = new OracleParameter("Test", OracleDbType.RefCursor);
                outval.Direction = ParameterDirection.Output;
                dbCommand.Parameters.Add(outval);

                using (IDataReader reader = db.ExecuteReader(dbCommand))
                {
                    while (reader.Read())
                    {

                    }
                }

<add name="providerConnString" connectionString="Data Source=ABCD;Password=testuser;User ID=testpwd" providerName="Oracle.DataAccess.Client" />

      

We get the following exception intermittently. This happens when we try to access the application after being idle. How does the pooling work in the corporate library? How will it work if the application is idle for a long time? What is the default minimum pool size and the default maximum pool size?

An exception is thrown by the target of the call. System.Reflection.TargetInvocationException: An exception was thrown by the target of the call. ---> System.TypeInitializationException: The type initializer for "Oracle.DataAccess.Client.OracleClientFactory" is throwing an exception. ---> System.TypeInitializationException: The type initializer for Oracle.DataAccess.Client.CThreadPool threw an exception. ---> System.Runtime.InteropServices.COMException: Getting COM factory class for component with CLSID {CB2F6723-AB3A-11D2-9C40-00C04FA30A3E} failed due to the following Error: 800703fa An invalid operation was attempted on the registry key that has been marked for deletion. (Exception from HRESULT: 0x800703FA). at Oracle.DataAccess.Client.CThreadPool..cctor () --- End of internal exception stack trace - at Oracle.DataAccess.Client.OracleInit.Initialize () --- End of internal exception stack trace --- --- End of internal exception stack trace --- at System.RuntimeFieldHandle.GetValue (RtFieldInfo field, object instance, RuntimeType fieldType, RuntimeType declaringType, Boolean & domainInitialized) when System .Reflection.RtFieldInfo.UnsafeGetValue (Object obj) at System.Reflection.RtFieldInfo.InternalGetValue (Object obj, StackCrawlMark & ​​stackMark) at System.Reflection.RtFieldInfo.GetValue (object obj) at System.DataFider.Common.Dbrovider .GetFactory (DataRowRow Provider) at Microsoft.Practices.EnterpriseLibrary.Data.Configuration.DatabaseSyntheticConfigSettings.GetDefaultMapping (String dbProviderName) at Microsoft.Practices.EnterpriseLibrary.Data.Configuration.DatabaseSyntheticConfigettings.ConfigurationDatabaseSettings databaseSettings) at Microsoft.Practices.EnterpriseLibrary.Data.Configuration.DatabaseSyntheticConfigSettings.GetDatabase (String name) at Microsoft.Practices.EnterpriseLibrary.Data.DatabaseProviderFactory.DatabaseConfigurationBuilder.b__rent2 (String n) at System.CictionaryDatabase2.GetOrAdd(TKey key, Func

2 valueFactory) at Microsoft.Practices.EnterpriseLibrary.Data.DatabaseProviderFactory.DatabaseConfigurationBuilder.CreateDefault ()

+3


source to share





All Articles