Solved

Script using custom DLL not working

Posted on 2009-06-30
3
539 Views
Last Modified: 2013-11-10
I have a custom DLL and imported in the script component to use it. Withing the script designer, I can see the method accessing (from Intellisense). But when I run the package, it says that it does not find the method (if try to access the static method) or not able to load "type" I am instantiating it within the script.  
0
Comment
Question by:templeavenue
  • 2
3 Comments
 
LVL 30

Expert Comment

by:nmcdermaid
ID: 24751507
You could try late binding
Set oObject = CreateObject("YourDLLProgID")
Call oObject.YourMethod
To enable late binding you need to untick a setting in the editor though
0
 

Author Comment

by:templeavenue
ID: 24756114
Thanks for the reply. But it doesn't work. It will give me exception when I run the package. I need to add more info so that it can be resolved easier.
First, I am modifying existing DLL. In the same DLL, the classes existed before seems to be accessed and accessing the new class is giving me exception. The DLL is being done by different person in the past.
Second, Can you add reference fromt he Script Editor without putting the DLL in the .NET framework folder? I now have to put the DLL in the .NET framework folder as before in order to reference.
Also,  I tested the DLL by testing a small program to the the new class in the DLL.
I hope this would help us.

thanks again!
0
 

Accepted Solution

by:
templeavenue earned 0 total points
ID: 24756801
I figured it out. In the design time, it used the DLL in the .NET framework folder. But run time, it used the DLL registered by GAC(Global Assembly Cache). The DLL must be registered by using gacutil and must be the same .NET version used to created the DLL.
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

When you hear the word proxy, you may become apprehensive. This article will help you to understand Proxy and when it is useful. Let's talk Proxy for SQL Server. (Not in terms of Internet access.) Typically, you'll run into this type of problem w…
Ever wondered why sometimes your SQL Server is slow or unresponsive with connections spiking up but by the time you go in, all is well? The following article will show you how to install and configure a SQL job that will send you email alerts includ…
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now