Archived Forum Post

Index of archived forum posts

Question:

Chilkat.Crypt2 with SQL Server 2012

Dec 16 '15 at 12:28

I have been unsuccessful at getting past sp_OACreate under SqlServer 2012. The same sproc works on a SqlServer 2008 box.

EXEC @hr = sp_OACreate 'Chilkat.Crypt2', @crypt OUT results in -2147221005 for @hr.

Callig get error: EXEC @HR = sp_OAGetErrorInfo @crypt, @Source OUT, @Description OUT;

results in @Description being "Invalid class string".

I have checked the registry, the clsids are there. I even edited permission on crypt2 and crypt2.1 adding full control to everyone. I also verified the DLL's folder has everyone read/exec permissions.

I am at a loss here.


Answer

See the online reference documentation for the correct strings to pass to sp_OACreate. See http://www.chilkatsoft.com/refdoc/xChilkatCrypt2Ref.html


Answer

Ok, apparently the object names have been changed to protect the innocent.

I removed 9.5.0 from the server. I found an old download we had of 9.3.0. Now the sproc works as it did before. I am not going through a couple hundred databases to edit stored procedures because of a name change to include a version.

I am unsure what logic you were following when adding the version into the object names, but it can't imagine this is forward thinking. What happens when you release 9.6.0? We all have to do a search and replace on our code (assuming thats easy to do, which it isn't in SQL procs) and recompile our projects? I could see it being useful to create an alias so that Chilkat and Chilkat_9_5_0 could both reference the same object for reverse and forward code compatibility or allow the dev to choose a specific version (for some reason?) to target in their application. Not sure why someone would have multiple versions of your dll registered, if thats even possible.

Going from "Chilkat.Crypt2" to "Chilkat_9_5_0.Crypt2", IMHO, is simply bad form. It doesn't solve any apparent problem and it causes ALL existing code to break.

What is the latest version of the activeX utilities that has the old (correct) naming convention of "Chilkat.Crypt2" and where can I download it?


Answer

It is so that a future version of the ActiveX can co-exist with older versions. You've heard of DLL hell, right? The current naming of "Chilkat_9_5_0." has not changed for several YEARS. Eventually, Chilkat will do a major update to rid itself of all deprecated methods and make long-needed changes which break backward compatibility. When doing so, the name will change -- this will make it so that new programs can use the new version WITHOUT breaking existing older applications.


Answer

What about 9.4.x? Did it use the Chilkat.Crypt2 naming? If so, is there a download for it?