on 03-30-2011 4:50 PM
Hi all,
I would like to do a RFC-call using the .NET-connector 3.0 from a SQLServer stored procedure.
I created a program to do the call in C# and this is working. Then I started to "convert" this to a project to create a dll containing a stored procedure to be used in SQLServer. Without references to sapnco and sapnco_utils it is working. But when I add the references, build the project and try to create the assembly in SQLServer I get the following error:
Msg 6544, Level 16, State 1, Line 2
CREATE ASSEMBLY for assembly 'FS SAPCalls' failed because assembly 'sapnco_utils' is malformed or not a pure .NET assembly.
Unverifiable PE Header/native stub.
When I leave out the reference to sapnco_utils in the .NET-project, I get the same error.
Is there any way to get this working?
Regards,
Maurice.
Have you tried GACing sapnco and sapnco_utils ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Alan,
I dragged the sapnco.dll and sapnco_utils.dll into the c:\windows\assembly folder, without problems.
Is this what you mean by GACing the dll's?
However I still get the same error with the CREATE ASSEMBLY for my 'FS SAPCalls.dll'.
I also tried the following commands to load the sapnco and sapnco_utils into the SQLServer CLR:
CREATE ASSEMBLY sapnco
FROM 'C:\FS Application\FS SAPCalls\sapnco.dll'
WITH PERMISSION_SET = UNSAFE
GO
This fails with the same error as with loading my "FS SAPCalls.dll"
Next I tried:
CREATE ASSEMBLY sapnco_utils
FROM 'C:\FS Application\FS SAPCalls\sapnco_utils.dll'
WITH PERMISSION_SET = UNSAFE
GO
This fails with the following error:
Msg 6218, Level 16, State 3, Line 2
CREATE ASSEMBLY for assembly 'sapnco_utils' failed because assembly 'sapnco_utils' failed verification. Check if the referenced assemblies are up-to-date and trusted (for external_access or unsafe) to execute in the database. CLR Verifier error messages if any will follow this message
Any help will be appreciated.
Regards,
Maurice.
User | Count |
---|---|
77 | |
9 | |
9 | |
7 | |
7 | |
6 | |
6 | |
6 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.