Ejemplo n.º 1
0
		/// <remarks>
		/// public static variable Instance should hold the the singleton instance 
		/// based on the knowledge that custom factories without this instance variable
		/// ms.net  throws exception 
		/// <pre>
		/// System.InvalidOperationException: The requested .Net Framework Data 
		///             Provider's implementation does not have an Instance field 
		///             of a System.Data.Common.DbProviderFactory derived type.
		///     at System.Data.Common.DbProviderFactories.GetFactory(DataRow providerRow)
		///     at System.Data.Common.DbProviderFactories.GetFactory(String providerInvariantName)
		/// </pre>
		/// </remarks>
		static OdbcFactory() 
		{
                        lock (lockStatic) 
                        {
				if (Instance == null)
					Instance = new OdbcFactory ();
			}
		}
 // create singleton connection factory.
 internal static OdbcConnectionFactory GetSingleton (OdbcFactory pvdrFactory)
 {
         lock (lockobj) 
                 {
                         if (Instance == null)
                                 Instance = new OdbcConnectionFactory (pvdrFactory);
                         return Instance;
                 }
 }
Ejemplo n.º 3
0
 /// <remarks>
 /// public static variable Instance should hold the the singleton instance
 /// based on the knowledge that custom factories without this instance variable
 /// ms.net  throws exception
 /// <pre>
 /// System.InvalidOperationException: The requested .Net Framework Data
 ///             Provider's implementation does not have an Instance field
 ///             of a System.Data.Common.DbProviderFactory derived type.
 ///     at System.Data.Common.DbProviderFactories.GetFactory(DataRow providerRow)
 ///     at System.Data.Common.DbProviderFactories.GetFactory(String providerInvariantName)
 /// </pre>
 /// </remarks>
 static OdbcFactory()
 {
     lock (lockStatic)
     {
         if (Instance == null)
         {
             Instance = new OdbcFactory();
         }
     }
 }
Ejemplo n.º 4
0
 // create singleton connection factory.
 internal static OdbcConnectionFactory GetSingleton(OdbcFactory pvdrFactory)
 {
     lock (lockobj)
     {
         if (Instance == null)
         {
             Instance = new OdbcConnectionFactory(pvdrFactory);
         }
         return(Instance);
     }
 }
Ejemplo n.º 5
0
		/// <remarks>
		/// public static variable Instance should hold the the singleton instance 
		/// based on the knowledge that custom factories without this instance variable
		/// ms.net  throws exception 
		/// <pre>
		/// System.InvalidOperationException: The requested .Net Framework Data 
		///             Provider's implementation does not have an Instance field 
		///             of a System.Data.Common.DbProviderFactory derived type.
		///     at System.Data.Common.DbProviderFactories.GetFactory(DataRow providerRow)
		///     at System.Data.Common.DbProviderFactories.GetFactory(String providerInvariantName)
		/// </pre>
		/// </remarks>
		static OdbcFactory() 
		{
			if (Instance == null)
				Instance = new OdbcFactory ();                       
		}