SQL ASSEMBLY DLL CALLING OTHER DLL OBJECT -
04-26-2007
, 11:27 AM
Hi, I have to call a COM object in an SQL job.
I build an assembly from a dll i created but i can't call the COM object from SQL.
sample:
Dim type As System.Type = System.Type.GetTypeFromProgID("Excel.Application")
error:
Msg 6522, Level 16, State 1, Procedure sp_MyCLRProcs, Line 0
A .NET Framework error occurred during execution of user defined routine or aggregate 'sp_MyCLRProcs':
System.Security.SecurityException: Request for the permission of type 'System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.
System.Security.SecurityException:
at System.Security.CodeAccessSecurityEngine.ThrowSecu rityException(Assembly asm, PermissionSet granted, PermissionSet refused, RuntimeMethodHandle rmh, SecurityAction action, Object demand, IPermission permThatFailed)
at System.Security.CodeAccessSecurityEngine.ThrowSecu rityException(Object assemblyOrString, PermissionSet granted, PermissionSet refused, RuntimeMethodHandle rmh, SecurityAction action, Object demand, IPermission permThatFailed)
at System.Security.CodeAccessSecurityEngine.CheckSetH elper(PermissionSet grants, PermissionSet refused, PermissionSet demands, RuntimeMethodHandle rmh, Object assemblyOrString, SecurityAction action, Boolean throwException)
at System.Security.CodeAccessSecurityEngine.CheckSetH elper(CompressedStack cs, PermissionSet grants, PermissionSet refused, PermissionSet demands, RuntimeMethodHandle rmh, Assembly asm, SecurityAction action)
at Integracao_DocsAbertos.Integra_DocsAbertos(String ID) |