示例#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;
                 }
 }
示例#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();
         }
     }
 }
示例#4
0
 // create singleton connection factory.
 internal static OdbcConnectionFactory GetSingleton(OdbcFactory pvdrFactory)
 {
     lock (lockobj)
     {
         if (Instance == null)
         {
             Instance = new OdbcConnectionFactory(pvdrFactory);
         }
         return(Instance);
     }
 }
		/// <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 ();                       
		}