Return-Path: Delivered-To: apmail-logging-log4net-user-archive@www.apache.org Received: (qmail 20532 invoked from network); 10 Jun 2006 13:41:30 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 10 Jun 2006 13:41:30 -0000 Received: (qmail 19785 invoked by uid 500); 10 Jun 2006 13:41:29 -0000 Delivered-To: apmail-logging-log4net-user-archive@logging.apache.org Received: (qmail 19757 invoked by uid 500); 10 Jun 2006 13:41:28 -0000 Mailing-List: contact log4net-user-help@logging.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: "Log4NET User" List-Id: Delivered-To: mailing list log4net-user@logging.apache.org Received: (qmail 19743 invoked by uid 99); 10 Jun 2006 13:41:28 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 10 Jun 2006 06:41:28 -0700 X-ASF-Spam-Status: No, hits=1.4 required=10.0 tests=DNS_FROM_RFC_ABUSE,DNS_FROM_RFC_WHOIS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [68.142.200.115] (HELO web30502.mail.mud.yahoo.com) (68.142.200.115) by apache.org (qpsmtpd/0.29) with SMTP; Sat, 10 Jun 2006 06:41:27 -0700 Received: (qmail 34823 invoked by uid 60001); 10 Jun 2006 13:41:06 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=OgKuIi9fhZ+KIIMY4UBxIw8E0nWmwYRkwsEyYEMUaStdg0yAkR+yoOV5UsgN+HoopBPPNe8LNgkUWZ6dItHCzhHbS2YFvlg8+NzePL+18kNr6fwhwkLKEpgLxJqdPGEvwlb6Mz3pB4+tnW3dtu3oaVXjXc+S/CwNPJVj1gNkLAA= ; Message-ID: <20060610134106.34821.qmail@web30502.mail.mud.yahoo.com> Received: from [65.24.255.41] by web30502.mail.mud.yahoo.com via HTTP; Sat, 10 Jun 2006 06:41:06 PDT Date: Sat, 10 Jun 2006 06:41:06 -0700 (PDT) From: Ron Grabowski Subject: Re: Trouble using AdoNetAdapter with .net 2.0 project To: Log4NET User In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N I think this it the correct OleDbConnection signature for .NET 2.0: System.Data.OleDb.OleDbPermission, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 Maybe the error is occuring becuase you're telling .NET 2.0 to use the 1.1 object. What happens if you omit the PublicKeyToken and let the Framework decide which object to use: --- Nikos Viorres wrote: > Hi all, > > When trying to log into an access db using the AdoNetAdapter with an > OleDb > connection i get the following error in a VS 2005 (.NET 2.0) > project. > Please take note that the exact same project with the same > configuration > works fine under .NET 1.1 (VS 2003). > > A first chance exception of type > 'System.Runtime.InteropServices.InvalidComObjectException' occurred > in > System.Data.dll > log4net:ERROR [AdoNetAppender] Exception while writing to database > System.Runtime.InteropServices.InvalidComObjectException: COM object > that > has been separated from its underlying RCW cannot be used. > at > System.Data.Common.UnsafeNativeMethods.ICommandText.Execute(IntPtr > pUnkOuter, Guid& riid, tagDBPARAMS pDBParams, IntPtr& pcRowsAffected, > Object& ppRowset) > at > System.Data.OleDb.OleDbCommand.ExecuteCommandTextForSingleResult(tagDBPARAMS > dbParams, Object& executeResult) > at System.Data.OleDb.OleDbCommand.ExecuteCommandText(Object& > executeResult) > at System.Data.OleDb.OleDbCommand.ExecuteCommand(CommandBehavior > behavior, Object& executeResult) > at > System.Data.OleDb.OleDbCommand.ExecuteReaderInternal(CommandBehavior > behavior, String method) > at System.Data.OleDb.OleDbCommand.ExecuteNonQuery() > at log4net.Appender.AdoNetAppender.SendBuffer(IDbTransaction > dbTran, > LoggingEvent[] events) > at log4net.Appender.AdoNetAppender.SendBuffer(LoggingEvent[] > events) > A first chance exception of type > 'System.Runtime.InteropServices.InvalidComObjectException' occurred > in > System.Data.dll > log4net:WARN AdoNetAppender: Exception while disposing cached command > object > System.Runtime.InteropServices.InvalidComObjectException: COM object > that > has been separated from its underlying RCW cannot be used. > at > System.Data.Common.UnsafeNativeMethods.IAccessor.ReleaseAccessor(IntPtr > hAccessor, Int32& pcRefCount) > at System.Data.OleDb.RowBinding.Dispose() > at System.Data.OleDb.Bindings.Dispose() > at System.Data.OleDb.OleDbCommand.CloseInternal() > at System.Data.OleDb.OleDbCommand.ResetConnection() > at System.Data.OleDb.OleDbCommand.Dispose(Boolean disposing) > at System.ComponentModel.Component.Dispose() > at log4net.Appender.AdoNetAppender.OnClose() > > > The configuration file of log4net for AdoNetAdapter looks like this: > > > value="Provider=Microsoft.Jet.OLEDB.4.0;Data > Source=D:\nviorres\Develepoment\e-passport\CSCA-05\csca.mdb;User > Id=Admin;Password=;" /> > > Thanks in advance > Nikos > > >