954,582 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Vb6.0 DLL & SQL Server2000 DTS Package

I have created a DLL file using VB6.0 and the registered the DLL into another server. Now I have created a DTS Package (ActiveX Task) which will create object of the DLL and call a particular function.
The problem is when I execute the DTS task from my ID, everything is fine. But, whenever a Generic ID is used to initialte the task the task either fails saying "Can not create Object - Permission Denied" or the dialog box appears show executing task but nothing actually happens. There seems to be some permission conflict but where?

Speedy reply is required as I am running behind schedule.
Thanks!

priyam1309
Newbie Poster
11 posts since May 2010
Reputation Points: 10
Solved Threads: 0
 

hmm. post code and connection string'

finito
Nearly a Posting Virtuoso
1,321 posts since May 2010
Reputation Points: 60
Solved Threads: 135
 

It is a long code, the DLL basically generates reports quering the database. I have tested the DLL by creating a diffenrent EXE which adds the DLL as reference and calling the Main function of the DLL. After which I created the DTS package with an ActiveX Task with the follwoing code -

Dim objDLL
Set objDLL = new CreateObject(ProjectName.ClassName)
Call objDLL.FunctionName
End

Before running the task in SQL SERVER, I logged into the Database Server and registered the DLL using REGSVR32 DLLName
Now, When I run the DTS Task from my ID (where the DLL was created, it is working).
If I am using some other ID to execute the DLL, it fails. Even though, the other ID is an ADMIN ID.

Please Help. I hope this has given some more light into my problem.

priyam1309
Newbie Poster
11 posts since May 2010
Reputation Points: 10
Solved Threads: 0
 

Hmm sounds like you need to add permission in the datebase
can you run the query in the DB itself?

finito
Nearly a Posting Virtuoso
1,321 posts since May 2010
Reputation Points: 60
Solved Threads: 135
 

Yes I am able to query the DB, that's how I am pulling data from DB and and populating the excel report.

priyam1309
Newbie Poster
11 posts since May 2010
Reputation Points: 10
Solved Threads: 0
 

Register the dll under the admin account and then right click>properties and give users of the system the rights needed and I think your problems will go away...

Good Luck

vb5prgrmr
Posting Virtuoso
1,912 posts since Mar 2009
Reputation Points: 156
Solved Threads: 296
 

I tried but didnt help...

priyam1309
Newbie Poster
11 posts since May 2010
Reputation Points: 10
Solved Threads: 0
 

what I mean is can you login as admin in the db and other users to see if you can retrieve the query

finito
Nearly a Posting Virtuoso
1,321 posts since May 2010
Reputation Points: 60
Solved Threads: 135
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You