• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 946
  • 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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

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