訊息 6522,層級 16,狀態 1,過程 InsertCurrency_String,第 0 行
在執行使用者定義常式或彙總 "InsertCurrency_String" 期間出現 .NET Framework 錯誤:
System.Exception: 試圖執行 CLR 主機禁止的操作。
System.Exception:
在 SqlServerCLRCallNet.CLRFunction.CallSAPFunUpdateDataVB(String strFunName, ListDictionary strArgs, ListDictionary strTableArgs, ListDictionary strRetTabs, ListDictionary& strResult)
在 SqlServerCLRCallNet.CLRFunction.GetResultSetString(String SNO)
。
訊息 6522,層級 16,狀態 1,過程 InsertCurrency_String,第 0 行
在執行使用者定義常式或彙總 "InsertCurrency_String" 期間出現 .NET Framework 錯誤:
System.Security.HostProtectionException: 試圖執行 CLR 主機禁止的操作。
受保護的資源(只有完全信任才可訪問)是: All The protected resources (only available with full trust) were: All
要求的資源是: ExternalProcessMgmt The demanded resources were:
System.Security.HostProtectionException:
在 VBLib.VBSAP..ctor(String sapSystem, String ApplicationServer, String Client, String SystemNumber)
在 SqlServerCLRCallNet.CLRGetMara.GetMara(String SNO, String& strMess)
原因:
SQL Server Common Language Integration (CLR) 程式設計不允許使用具有 HostProtectionAttribute (會指定含有 ExternalProcessMgmt、ExternalThreading、MayLeakOnAbort、SecurityInfrastructure、SelfAffectingProcessMgmnt、SelfAffectingThreading、 SharedState、Synchronization 或 UI 值的 System.Security.Permissions.HostProtectionResource 列舉) 的類型或成員。下列資料表所列出 Microsoft.VisualBasic.dll 組件的成員和類型之主機保護屬性 (HPA) 值是不允許的。
http://msdn.microsoft.com/zh-tw/library/ms403281(v=SQL.100).aspx