SQL Server and J# integration problem
Hi, I am using SQL Server 2005 b2 and i want to integrate my J# project with SQL Server. .NET Platform compiles it. No problem there. But while i try to create assembly by referencing produced dll file, SQL Server gives that error:
"Msg 6581, Level 16, State 1, Line 2
Could not find assembly 'vjscor.dll' in directory 'c:\'."
What is the problem? Thanks in advance...
OK, I assume your compiled dll is in c:\? What happens whe you create an assembly in SQL is that SQL Server looks at what dependencies you have to other assemblies. When it finds a dependency 'vjscor.dll' it first looks to see if the assembly is in hte database already, then it looks at an internal list of "blessed" assemblies (assemblies that are allowed to be loaded from the GAC - not all system assemblies are blessed). If the assembly is not in the list it tries to create it in SQL Server from the application directory, and if it's not found there you'll get the error you see.
Without knowing VJ#, I'd assume that vjscor.dll is a GAC:ed assembly and therefore you see what you see. My suggestion is to first run CREATE ASSEMBLY against vjscor.dll and then create your assembly. Notice that you may have to create vjscor with UNSAFE or EXTERNAL_ACCESS due to what vjscor is doing internally.
Hope this helps!
Niels