Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Import/Export (DTS) and Replication (2000)
 Custom COM in job step

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2002-01-21 : 10:10:37
Tony writes "I am creating a Job in SQL Server 2000 that sends all billing information to accounting on the first day of the month. One of the steps uses a custom DLL written by our team that encrypts and decrypts the credit card number. This objects works fine in the ASP. However, it fails in the step, and gives me this message in the job history:

Error Code: 0 Error Source= Microsoft VBScript runtime error Error Description: Object variable not set: 'CreateObject' Error on Line 1. The step failed.

Here is the code from the step (minus the real object name):

dim objCrypt
Set objCrypt = CreateObject("iCustomObject.Class")

if I substitute the ("iCustomObject.Class") with ("adodb.connection"), the step will pass.

I know the DLL is registered. Is there some other way I have to register it with SQL Server? Am I missing something else? This is driving me crazy.

Thanks"

andre
Constraint Violating Yak Guru

259 Posts

Posted - 2002-01-21 : 10:43:58
I don't know of anything special you need to do when registering a DLL for use on SQL Server.

Is the SQL Server on the same server running your ASP?


Go to Top of Page

Anthony
Starting Member

2 Posts

Posted - 2002-01-21 : 11:07:11
Yes it is. The ASP runs fine, too, but the job fails on the creation of hte custom object. I'm gonna lose it soon :)

Go to Top of Page

andre
Constraint Violating Yak Guru

259 Posts

Posted - 2002-01-21 : 11:20:52
The only idea I have right now is to make sure the user you're running the job under has read and execute permissions on the DLL.

What error do you get if you place the following in a VBS file and run it:

dim objCrypt
Set objCrypt = CreateObject("iCustomObject.Class")
Set objCrypt=Nothing

Go to Top of Page

Anthony
Starting Member

2 Posts

Posted - 2002-01-22 : 11:16:21
It runs fine in a VBS file. That's what's stumping me. I've checked the permissions, and they are fine.

Go to Top of Page

andre
Constraint Violating Yak Guru

259 Posts

Posted - 2002-01-22 : 11:46:16
Do you have SP2 for SQL Server?

Go to Top of Page

nlocklin
Yak Posting Veteran

69 Posts

Posted - 2002-02-04 : 15:16:39
Edit: Nevermind, I'm stupid. I just noticed I was running the DTS package from my computer and not the server.


Edited by - nlocklin on 02/04/2002 15:22:43
Go to Top of Page
   

- Advertisement -