Solved

Script using custom DLL not working

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

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

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

Let's review the features of new SQL Server 2012 (Denali CTP3). It listed as below: PERCENT_RANK(): PERCENT_RANK() function will returns the percentage value of rank of the values among its group. PERCENT_RANK() function value always in be…
For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.

895 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