I' m using VB.NET 2008, VSTO 2.0, Framwork 2.0 and .Net Remoting.
when I call the function CopyFromRecordset for my recordset I get an error:
System.OutOfMemoryException: Type 'ADODB.InternalFields' in Assembly 'ADODB,
Version=7.0.3300.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' is not
marked as serializable. Server stack trace: Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage
reqMsg, IMessage retMsg) at
System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData,
Int32 type) at
Microsoft.Office.Interop.Excel.Range.CopyFromRecordset(Object Data, Object
MaxRows, Object MaxColumns) at
ExcelWorkbook2.XlsAtskaite.CreateRange(Object oRange, String
spClassAndMethodName, Object opArgs) in MYCODE.vb.
When I was using VB.NET 2003, vsto 1.0 and COM+ function have worked
perfectly.
Any ideas?
Thanks.
|