Solved

Script using custom DLL not working

Posted on 2009-06-30
3
542 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

VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Trying to get a Linked Server to Oracle DB working 21 60
T-SQL: Do I need CLUSTERED here? 13 45
optimize stored procedure 6 28
performance query 4 24
Introduction In my previous article (http://www.experts-exchange.com/Microsoft/Development/MS-SQL-Server/SSIS/A_9150-Loading-XML-Using-SSIS.html) I showed you how the XML Source component can be used to load XML files into a SQL Server database, us…
The Delta outage: 650 cancelled flights, more than 1200 delayed flights, thousands of frustrated customers, tens of millions of dollars in damages – plus untold reputational damage to one of the world’s most trusted airlines. All due to a catastroph…
Via a live example, show how to backup a database, simulate a failure backup the tail of the database transaction log and perform the restore.
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.

810 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