made some library and want to use it as CLR assembly in MSSQL. The point is that my lib have the reference to 'iAnywhere.Data.SQLAnywhere' lib which I cannot install. The error is:
I have implemented the recommendations and now my SQL looks like:
Does anybody know how to fix this? |
This is probably closer to a Microsoft SQL Server question than a SQL Anywhere question, so you may want to check out other Microsoft SQL Server resources for further assistance. The deployment requirements for the SQL Anywhere ADO.NET assembly are noted in the documentation - ensuring that the native DLLs can be located via the SQL Server's PATH environment variable is likely the most important point for deploying the unmanaged DLLs. There is a stackoverflow question that seems to suggest this might be due to a mismatch of CLR versions. It seems that there's an open question of which CLR version currently runs on SQL Server, depending on environment configuration - to determine your current configuration, you will need to run the SQL:
Perhaps you need to load the 4.0 CLR ADO.NET provider ( |
I am no expert on SQL Server but the message you quoted mentioned "policy". There is a policy file that accompanies easch release of the provider that indicates that the new version can satisfy earlier versions. Perhaps your "Debug" version is too new or too old. I'd try running "setupvspackage /ua" in the SQL Anywhere Assembly\V2 folder from an admin command prompt and then "setupvspackage /i". Repeat for Assembly\V4. Then make sure that the provider referenced in your "FROM" clause is that same version. This might help. |
Maybe this is the obstacle: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\OnlyUseLatestCLR is it set to 1? nope, that doesn't help. Same error
(19 Dec '13, 09:20)
Andrii Horda
|