October 1, 2004 at 8:31 am
I've got a SQL Agent job with 5 steps, 2 of which are ActiveX scripts (fairly straightforward). Each script creates a number of objects, then destroys them by setting them as Nothing.
When I try to save the job, I get the following error:
Error 14227: The command script does not destroy all the objects that it creates. Revise the command script. The job was not saved.
This error started to appear after I had altered the code in the second ActiveX script to create an XMLBulkLoad object, import some XML, then destroy the object the same as the others.
All objects are definitely destroyed as said above.
Any ideas what might be causing this?
October 4, 2004 at 8:00 am
This was removed by the editor as SPAM
October 11, 2004 at 9:57 am
I solved this by moving the Set objVariable = Nothing statements to the very end, rather than destroying them as and when I no longer needed them throughout the script.
Upon doing this, the job saved.
May 16, 2005 at 4:54 am
Same for me, all nothing referenceses need to be the last that happens.
Thanks for the help!!!
May 16, 2005 at 5:07 am
Wow, I've posted a question on a public forum, answered it (publically) myself and subsequently helped someone else 6 months later!
Don't ya love the Internet?
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply