Discussion Locked

VB6, COM/DCOM and MTS

0 helpful
7 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

I have an app that uses a .exe and a .dll on the Client and two .dlls running in MTS on the Server. Originally, I installed everything on the NT workstation, including the components running in MTS and it worked. In other words, everything but thedatabase was on the workstation. Now, however, I have installed the server components on the server machine and I get the "ActiveX component can't create object" message.

Why would this work with everything installed on one machine and not when the server components are installed in MTS on the server box?

See the question "COM/DCOM (VB6) components with MTS" for more information on this.

7 replies

by glen_mcleod

Once you have installed the components on the server, you have to run the 'dcomcnfg' utility to configure the components to be accessed from the network. It's pretty complex, so you might want to get some documentation from MSDN to help you.

Glen

by briceb

Thanks for the info. I have looked at that, but I can't see anything that would prevent the server components from being accessed by the client.

by johnyboy

have you got a user account set up on the remote server that allows access. you also need to install on the local machine a proxy sub and give this proxy the user account that is allowed to use the components on the server.

by gbworld

Brice:

I am not sure I have all of the information necessary to really guide you to the proper end here. The ActiveX component cannot create object means that a component somewhere is not registered. This could be as simple as the wrong version of a DLL (the FileSystemObject is notorious). It can also be that you are attempting DCOM calls, in which case you need to set this up.

I am assuming a couple of things:

1. You created a new package (or copied the package if using DCOM) and created it in MTS.

2. You moved all components.

The best method to determine what is happening is to add line numbers to the objects you create (the Mandlebrot Set - Advanced Visual Basic - has a tool to automate this.). Then, add some form of logging to your error handler. This will help you determine which object is the problem here.

Using this information, you should be able to tell if it is the package or a single component. If it is the package, you will need to link the packages with dcomdnfg.exe. Exporting and importing a package can save steps. Look up MTS in MSDN and, in particular, packages.

GB

This discussion is closed to new replies.