問題:
最近使用C#寫一個ADO存取ACCESS檔案。在W7以及XP執行都正常。但在Windows Embedded POSReady 2009卻一直出現以下錯誤
--------------------------------------------------------------------
System.InvalidCastException: Unable to cast COM object of type 'System.__ComObject' to interface type 'ADODB.Connection'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{00001550-0000-0010-8000-00AA006D2EA4}' failed due to the following error: 不支援此種介面 (Exception from HRESULT: 0x80004002 (E_NOINTERFACE)).
at OperateCamera.Form1.button2_Click(Object sender, EventArgs e) in d:\繼光香香雞\new\拍照打卡\OperateCamera\Form1.cs:line 1834
--------------------------------------------------------------------
System.TypeLoadException: Could not load type 'ADODB.FieldsToInternalFieldsMarshaler' from assembly '繼光香香雞拍照打卡, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.
at System.StubHelpers.StubHelpers.CreateCustomMarshalerHelper(IntPtr pMD, Int32 paramToken, IntPtr hndManagedType)
at ADODB._Recordset.get_Fields()
at OperateCamera.Form1.button2_Click(Object sender, EventArgs e) in d:\繼光香香雞\new\拍照打卡\OperateCamera\Form1.cs:line 1844