Cannot release ActiveX dll

Posted on 2003-03-06
Medium Priority
Last Modified: 2008-02-01
Hello all,

I have a small problem.  I created an activeX dll and for some reason I cannot release it with the =nothing command.

I get:
Error Type:
Microsoft VBScript runtime (0x800A005B)
Object variable not set
/encoder.asp, line 18

Here is my code:
     dim Encode
     set Encode = Server.CreateObject("MyTools.Encode")

     dim Strng
     Strng = "This string will be encoded soon!"

     dim codedString
     codedString = Encode.Code(cStr(strng), "Reg Key")

     dim deCodedString
     deCodedString = Encode.Code(cStr(codedString), "Reg Key")

     response.write(Strng + "<br />")
     response.write(server.htmlencode(codedString) + "<br />")
     response.write(deCodedString + "<br />")

     Encode = nothing


Everything works except the line at the end (Encode = nothing).  That's when I get the error.  When I try to update the DLL, I have to restart my computer because it's not released!

Thank you all in advance!
Question by:fsiwrb
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
LVL 27

Expert Comment

ID: 8080657
How did you create the object? In VB? or C++? Or? Can you post the code?

Expert Comment

ID: 8080924
I created it in VB6.  I cant post the code as it would defeat the purpose.  Everything works fine beyond trying to release it.  It's hard to imagine that it doesnt want to be released.  I thought that maybe my code ends after running so the object doesnt remain instantiated.  Is it possible that the class is called and then released after returning the value?


Accepted Solution

zeheb earned 300 total points
ID: 8081584
Just change the line from Encode = Nothing to Set Encode = Nothinh and it should work.
Will your db performance match your db growth?

In Percona’s white paper “Performance at Scale: Keeping Your Database on Its Toes,” we take a high-level approach to what you need to think about when planning for database scalability.


Author Comment

ID: 8082869
nothinh?  Just set it to some random value?  Encode = ""?

Author Comment

ID: 8082876
will that release the DLL so I can make recompile it without restarting my PC?

Expert Comment

ID: 8083945
Oh, good call jeheb!  I was focusing on "Nothinh" instead of set.  I hate making dumb mistakes like that!

Featured Post

Learn by Doing. Anytime. Anywhere.

Do you like to learn by doing?
Our labs and exercises give you the chance to do just that: Learn by performing actions on real environments.

Hands-on, scenario-based labs give you experience on real environments provided by us so you don't have to worry about breaking anything.

Question has a verified solution.

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

Australian government abolished Visa 457 earlier this April and this article describes how this decision might affect Australian IT scene and IT experts.
Dramatic changes are revolutionizing how we build and use technology. Every company is automating, digitizing, and modernizing operations. We need a better, more connected way to work together as teams so we can harness the insights from our system…
This video teaches users how to migrate an existing Wordpress website to a new domain.
The is a quite short video tutorial. In this video, I'm going to show you how to create self-host WordPress blog with free hosting service.
Suggested Courses

801 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