• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 943
  • Last Modified:

CLR Stored Procedure in SQL Server 2005

I am trying to create a stored proc from .net clr code and it is failing because one of the referenced dll files is not in an assembly (in sql server).  I attempt to create an assembly with this dll and I get the folowing error:

Failed to open malformed assembly 'MyLibrary' with HRESULT 0x8007000b.

This dll file seems to work fine elsewhere, does anyone know what is causing this?
0
dave4dl
Asked:
dave4dl
  • 2
1 Solution
 
Giant2Commented:
It could be this assembly was compiled over a different system with different dll links.
If you can, try to recompile this "external dll" on the machine where the sqlServer is executing (and where it will be used).

Hope this could help you.
Bye, Giant.
0
 
dave4dlAuthor Commented:
Giant,

Thanks for the suggestion.  I actually already did this (i was trying to make sure that there wasnt a conflict between .NET frameworks) with no change in behavior.  Still not sure what is the root cause.

Thanks
0
 
dave4dlAuthor Commented:
I ended up not needing to bring the external dll file into an assembly.  I did have to make sure that the dll file referenced by the clr code in the assembly was in a directory listed in the environmental variable "PATH".  I think that probably the dll causing the "malformed assembly" error was not created with clr.

Thanks for trying to help Giant2.
0

Featured Post

Prepare for your VMware VCP6-DCV exam.

Josh Coen and Jason Langer have prepared the latest edition of VCP study guide. Both authors have been working in the IT field for more than a decade, and both hold VMware certifications. This 163-page guide covers all 10 of the exam blueprint sections.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now