Click here to Skip to main content
15,501,490 members
Please Sign up or sign in to vote.
3.00/5 (2 votes)
See more:
Hi,

I am facing some problems in the deployment of my VB ActiveX DLL on a server.
I have a job which runs a stored procedure. The job and the SP are on the same server as the DLL. Using this stored procedure I access the classes (and the methods in those classes) in DLL by using the sp_oacreate and sp_oamethod.

The application, whose DLL is deployed, is on another server and is in VB6.0
Now I have modified a small code of this application and created another DLL.
I want to place my DLL there on the server by replacing the old one.
For this I unregistered the old DLL by using REGSVR32 /u and then registered my DLL there.
but I am not getting the result. Even though the code which I have modified gives results on the machine where the source code is present.
I ran the SQL Profiler and caught a query which was making an error entry in an error table.

The Error is:clsRoll.CheckSchedulesItem cannot be found in the collection corresponding to the requested name or ordinal.

the name of my DLL is GMSAutoRoll.dll
clsRoll is a class file and CheckSchedules is a method in the class and it's public.

Please Help!!!
It's really urgent....
Posted
Comments
CHill60 12-Feb-13 9:02am     CRLF
Any particular reason why you've installed the DLL on a different server to the application that uses it? When you say you have registered the DLL ... on which server did you register it? It needs to be in the registry of the server that it is being *used* on ... i.e. the server with the application on, not the server on which it happens to reside
Adwaitam 12-Feb-13 11:30am    
thanks for the reply..by the way i have registered the dll on the registry of server where the application is. but still facing this issue...
CHill60 12-Feb-13 11:43am    
Ok ... what I normally do in these circumstances is unregister and remove the new DLL then put the old DLL back (and reregister it). If it "works" - obviously not fully as your changes have been removed :-) then it could be to do with your changes ... possible a typo in a function/property name. Just trying to narrow down the field.
Sergey Alexandrovich Kryukov 12-Feb-13 13:01pm     CRLF
Any particular reason to use VB6? :-) —SA
CHill60 12-Feb-13 18:22pm    
I'm guessing the VB6 thing is because there are soooo many corporates out here still using legacy applications and only just realising that they need to move on. It's actually guite good for us dinosaurs that can still code in VB6 and have a bit of an idea of how to migrate to C# etc. :-) At the end of the day if you can't actually help the guy, and it's not a repost and it's not spam and it's not homework *what* was the point of your comment???

1 solution

This is a solution more for CHill60 who I don't want to frustrate, rather than for OP, but I'm sure my answer will be pretty useful for nearly everyone, especially for those using VB6.

How to mount a dead horse?

Even though its seems that, if a horse is dead, using some other, more suitable horse would be the best strategy, a lot of people in such situation use alternative strategy for many years, when it comes to using some software products.

Here are those strategies used by people to mount a dead horse:
  1. To buy a bigger whip and whip harder.
  2. To hire an expert who can help in the dead horse study.
  3. To exchange opinions with other riders who had similar experience.
  4. To improve horse grooming.
  5. To take a training course "Mastering Horse in Ten Days".
  6. To convince yourself in the importance of mastering the horse in modern society.
  7. To convince yourself that a horse is not dead but is currently sleeping.
  8. To buy a book on horse speed optimization.
  9. If all of the above did not work: to declare that the dead horse is "more comfortable".
If someone thinks that this answer is less than perfect, I will gladly agree. It's just so happened that the I saw this anecdote at the moment when I still remembered this questions and comments. In fact, the analogy is pretty pure: in reality, we are discussing the horse which was born dead and people who failed to notice it.

[EDIT] See also: second comment to this question: Declarition Expected Errors[^] by Christian Graus.

Happy riding!

—SA
 
Share this answer
 
v9
Comments
Chris Reynolds (UK) 13-Feb-13 4:32am     CRLF
How does this diatribe meet "Let's work to help developers, not make them feel stupid.". VB6 is still behind many core systems of large companies. Sure there are better choices now but redeveloping a large system isn't always an option.
Sergey Alexandrovich Kryukov 13-Feb-13 11:30am     CRLF
There is nothing about making people stupid here! This is maybe more important advice: do you guys really want to waste your life (I didn't even say "time", I say "life"!)? Think about it! Look around! I really want to help people. I think helping to cope with VB6 can be the anti-help, the way to prolong waste of time. You might have different opinion, but I stand for mine. —SA
Chris Reynolds (UK) 13-Feb-13 11:41am     CRLF
You've chosen to vent your opinions on a programming language that the OP asserts it is beyond his remit to switch from. To use your analogy. VB6 is an old horse that a lot of people have travelled many happy miles on and still works. COBOL is an old horse, PL1 is an old horse. Maybe you wouldn't buy those horses today but they aren't dead and have miles left in them. As you requested, I've just looked around and seen a team of programmers who can code in a number of languages very well including VB6, C#, PL1 and others as occasion and requirement demands - they all seem happy enough.
Sergey Alexandrovich Kryukov 13-Feb-13 11:43am     CRLF
It does not prove anything. What I say also prove anything, but using it is just using the principle "let it be: I'll be in trouble, but not today". No more no less. Thank you for sharing your thoughts. —SA
Chris Reynolds (UK) 13-Feb-13 11:58am    
And in that there is some truth. At some point all systems may need to be re-developed, an issue that is greater in the Windows world than, say, IBM mainframes where the tools to recompile COBOL etc from the 1970s still exist. In the Windows world we are dependent on tool vendors continuing to support old versions and Microsoft are not keen to maintain support for the VB6 development tools under new OSes even though the runtime persists. So, yes, companies with large suites of VB6 may need to re-develop due to platform incompatibilities. However this is not a fault of the language, just the choice of the vendor. Programmers do not always get the chance to choose when to redevelop a system although they can offer that opinion. In the mean time I don't see a problem helping other developers who have issues with any programming language.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900