Solved

moving visual basic program to window server 2003

Posted on 2013-01-14
7
452 Views
Last Modified: 2013-02-01
moving a vb application to window server 2003.  Installed visual studio 6 on the window server 2003 so it have the same references as on my workstation.  When it runs, it fails because "ActiveX Component can't create object   RunTime Error '429'
The problem is in the DTS.package code - it fails at the last statement "Set goPackage = goPackageOld "
---------------------------------------------------------------------------------------
Option Explicit
Public goPackageOld As New DTS.Package
Public goPackage As DTS.Package2
Public Sub datapump()
        MsgBox "datapump started1"
        Set goPackage = goPackageOld
0
Comment
Question by:phiadmin
  • 3
  • 3
7 Comments
 
LVL 57
ID: 38778115
Need to check the references.   Just because you installed VB6 doesn't mean you have all the DLLs or type libs that a project may reference as they may be from other installs and products (such as SQL Server).

If you set a specific reference, it's expecting the reference to be the same version and it being in the same place as it was before.

Jim.
0
 
LVL 45

Expert Comment

by:aikimark
ID: 38778411
does it matter that one of these variables is a DTS.Package and the other is a DTS.Package2 ?
0
 
LVL 57
ID: 38778743
<<does it matter that one of these variables is a DTS.Package and the other is a DTS.Package2 ? >>

 Looks like they either had two references set or maybe two different class wrappers written for one DTS package.

 Don't think that's a mistake, but without seeing the rest of the code, it's hard to say if it is or not.

 Still sounds like a reference problem though in anycase...

Jim.
0
Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

 

Author Comment

by:phiadmin
ID: 38779164
I am not an expert on vb, just trying to maintain this process until it is replace by a new ERP.

The program works on my workstation so I should not have to change the code.

The 7 references are the same on both system
The Microsoft DTSPackage Object Library reference the same DTSPKG.dll
0
 
LVL 57

Accepted Solution

by:
Jim Dettman (Microsoft MVP/ EE MVE) earned 500 total points
ID: 38779698
<<The 7 references are the same on both system
The Microsoft DTSPackage Object Library reference the same DTSPKG.dll >>

 Do the references include DAO?  If so:

1. Uncheck the reference in the VB6 program and close it
2. Drop to a command prompt and un-register it:

regsvr32 -u "c:\program files\common files\microsoft shared\dao\dao360.dll"

3. Re-register it:

regsvr32 "c:\program files\common files\microsoft shared\dao\dao360.dll"

4. Open the VB6 program, select the reference and check it, then try it.

If you don't have a reference for DAO, then one of the other references is broken.  It will be one of the ones before the DTS reference.  You'll have to investigate each one.   It needs to be in the same location and the same version as the one where the program works.

 If you still stuck, paste a screen shot of the references.

Jim.
0
 

Author Comment

by:phiadmin
ID: 38811159
We are going to install sqlServer on the server to test if that will fix the problem
0
 

Author Comment

by:phiadmin
ID: 38845484
after installing SQL SERVER, the vb code ran ok
0

Featured Post

Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Many companies are making the switch from Microsoft to Google Apps (https://www.google.com/work/apps/business/). Use this article to learn more about what Google Apps has to offer and to help if you’re planning on migrating to Google Apps. It is …
Technology opened people to different means of presenting information, but PowerPoint remains to be above competition. Know why PPT still works today.
Viewers will learn the different options available in the Backstage view in Excel 2013.
The viewer will learn how to simulate a series of coin tosses with the rand() function and learn how to make these “tosses” depend on a predetermined probability. Flipping Coins in Excel: Enter =RAND() into cell A2: Recalculate the random variable…

821 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question