Tüm hizmet paketi, C# ve .NET Framework 4.5 ile Visual Studio 2012 Ultimate sürümü ile bir WinForm uygulaması geliştiriyorum. Bu yığının ileDahili .Net Framework Veri Sağlayıcısı hatası 1
Internal .Net Framework Data Provider error 1
:
Bu durum almak
en System.Data.ProviderBase.DbConnectionInternal.PrePush(Object expectedOwner)
en System.Data.ProviderBase.DbConnectionPool.PutObject(DbConnectionInternal obj, Object owningObject)
en System.Data.ProviderBase.DbConnectionInternal.CloseConnection(DbConnection owningObject, DbConnectionFactory connectionFactory)
en System.Data.SqlClient.SqlConnection.CloseInnerConnection()
en System.Data.SqlClient.SqlConnection.Close()
en AdoData.TRZIC.DisposeCurrentConnection()
en AdoData.TRZIC.Finalize()
yıkıcı ilgili olarak:
~TRZIC()
{
DisposeCurrentConnection();
if (this.getCodeCmd != null)
this.getCodeCmd.Dispose();
}
private void DisposeCurrentConnection()
{
if (this.conn != null)
{
if (this.conn.State == ConnectionState.Open)
this.conn.Close();
this.conn.Dispose();
this.conn = null;
}
}
Ben çizgi this.conn.Close();
yılında istisna olsun.
Ve conn
private SqlConnection conn = null;
neden biliyor musunuz nedir?
bazı hatalar vardır, this.conn 'gerekmez = null; 'imha ettikten sonra, ve' DisposeCurrentConnection() 'işlevini çağırmadan önce komutunuzu atmanızı öneririm – RezaRahmati