• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 328
  • Last Modified:

can't create activex component runtime error


i got this error when i program in vb using DTS. on my computer it runs fine with error but when i install on my clients' pc , it comes out with this error. pls advise.


If yearStr <> Trim(cmbYear.Text) Then
   infomsg = MsgBox("Year selected does not match year_code in Budget File uploaded!", vbCritical, "Incorrect File Used")
   Screen.MousePointer = vbDefault
   Exit Sub
End If

SimpleExecutePackage

----------------------------

Private Sub SimpleExecutePackage()


Dim sMessage As String
Dim lErr As Long
Dim sSource As String
Dim sDesc As String

Set oPKG = New DTS.Package

oPKG.LoadFromSQLServer "TBSSDB", "sa", "", DTSSQLStgFlag_Default, , , , "Upload TBSS Budget"
oPKG.GlobalVariables("sFileName").Value = Trim(txtFileName.Text)
oPKG.GlobalVariables("sTableName").Value = Trim(xlsString)
oPKG.GlobalVariables("sHeaderName").Value = Trim(HeaderString)
oPKG.SaveToSQLServer "TBSSDB", "sa", "", DTSSQLStgFlag_Default, , , , , True

For Each oStep In oPKG.Steps
   oStep.ExecuteInMainThread = True
Next

oPKG.Execute

For Each oStep In oPKG.Steps
   If oStep.ExecutionResult = DTSStepExecResult_Failure Then
     oStep.GetExecutionErrorInfo lErr, sSource, sDesc
     sMessage = sMessage & "Step """ & oStep.Name & _
                """ Failed" & vbCrLf & _
                vbTab & "Error: " & lErr & vbCrLf & _
                vbTab & "Source: " & sSource & vbCrLf & _
                vbTab & "Description: " & sDesc & vbCrLf & vbCrLf
     Else
       sMessage = sMessage & "Step """ & oStep.Name & _
                  """ Succeeded" & vbCrLf & vbCrLf
     End If
Next

oPKG.UnInitialize

Set oStep = Nothing
Set oPKG = Nothing

End Sub
0
spiral
Asked:
spiral
  • 8
  • 4
  • 2
1 Solution
 
bruintjeCommented:
Hello spiral,

Have you build a setup package with the P&D wizard, and included the needed components to run against the server from a client pc?

HAGD:O)Bruintje
0
 
spiralAuthor Commented:
yes i include dtspkg.dll, custtask.dll
and 1 more dll which belonsg to dts
but it gives me that runtime error
0
 
arbertCommented:
There are more dependencies than that spiral.  

Check this out:

http://support.microsoft.com/default.aspx?scid=kb;en-us;315661
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
spiralAuthor Commented:
i found out that i need to install
server components in sql server 7.0 setup.
this takes away the error message.
 
however, i got another error:
it gives me a "file not foind" runtime error.
whats the cause of it?
0
 
bruintjeCommented:
that's very difficult to guess from the info .... i rather would try to setup a machine as per client spec and make a test installtion on that one having the possibility to debug also .... a file not found could be a program error or a missing dependency file ..... whne you open the project on a test setup missing files would be marked missing in the project / references
0
 
spiralAuthor Commented:
its
"run-time error '-2147287038 (80030002)
The system cannot find the file specified."

the error i got.
0
 
bruintjeCommented:
0
 
spiralAuthor Commented:
see below. i installed vb and the debugger breaks on the code below. my package name is "Upload TBSS Budget"
and the package description is "Upload TBSS Sale Budget"
what am i doin wrong? on my computer it runs fine.


Private Sub SimpleExecutePackage()


Dim sMessage As String
Dim lErr As Long
Dim sSource As String
Dim sDesc As String

Set oPKG = New DTS.Package

oPKG.LoadFromSQLServer "TBSSDB", "sa", "", DTSSQLStgFlag_Default, , , , "Upload TBSS Budget" ---> debugger breaks on here!!!
{error: system can't find the file specified here}



oPKG.GlobalVariables("sFileName").Value = Trim(txtFileName.Text)
oPKG.GlobalVariables("sTableName").Value = Trim(xlsString)
oPKG.GlobalVariables("sHeaderName").Value = Trim(HeaderString)
oPKG.SaveToSQLServer "TBSSDB", "sa", "", DTSSQLStgFlag_Default, , , , , True

For Each oStep In oPKG.Steps
   oStep.ExecuteInMainThread = True
Next

oPKG.Execute

For Each oStep In oPKG.Steps
   If oStep.ExecutionResult = DTSStepExecResult_Failure Then
     oStep.GetExecutionErrorInfo lErr, sSource, sDesc
     sMessage = sMessage & "Step """ & oStep.Name & _
                """ Failed" & vbCrLf & _
                vbTab & "Error: " & lErr & vbCrLf & _
                vbTab & "Source: " & sSource & vbCrLf & _
                vbTab & "Description: " & sDesc & vbCrLf & vbCrLf
     Else
       sMessage = sMessage & "Step """ & oStep.Name & _
                  """ Succeeded" & vbCrLf & vbCrLf
     End If
Next

oPKG.UnInitialize

Set oStep = Nothing
Set oPKG = Nothing

End Sub

0
 
spiralAuthor Commented:
see below. i installed vb and the debugger breaks on the code below. my package name is "Upload TBSS Budget"
and the package description is "Upload TBSS Sale Budget"
what am i doin wrong? on my computer it runs fine.


Private Sub SimpleExecutePackage()


Dim sMessage As String
Dim lErr As Long
Dim sSource As String
Dim sDesc As String

Set oPKG = New DTS.Package

oPKG.LoadFromSQLServer "TBSSDB", "sa", "", DTSSQLStgFlag_Default, , , , "Upload TBSS Budget" ---> debugger breaks on here!!!
{error: system can't find the file specified here}



oPKG.GlobalVariables("sFileName").Value = Trim(txtFileName.Text)
oPKG.GlobalVariables("sTableName").Value = Trim(xlsString)
oPKG.GlobalVariables("sHeaderName").Value = Trim(HeaderString)
oPKG.SaveToSQLServer "TBSSDB", "sa", "", DTSSQLStgFlag_Default, , , , , True

For Each oStep In oPKG.Steps
   oStep.ExecuteInMainThread = True
Next

oPKG.Execute

For Each oStep In oPKG.Steps
   If oStep.ExecutionResult = DTSStepExecResult_Failure Then
     oStep.GetExecutionErrorInfo lErr, sSource, sDesc
     sMessage = sMessage & "Step """ & oStep.Name & _
                """ Failed" & vbCrLf & _
                vbTab & "Error: " & lErr & vbCrLf & _
                vbTab & "Source: " & sSource & vbCrLf & _
                vbTab & "Description: " & sDesc & vbCrLf & vbCrLf
     Else
       sMessage = sMessage & "Step """ & oStep.Name & _
                  """ Succeeded" & vbCrLf & vbCrLf
     End If
Next

oPKG.UnInitialize

Set oStep = Nothing
Set oPKG = Nothing

End Sub

0
 
spiralAuthor Commented:
i solved my problem.
its due to the downward compatibility of sql server sp2 and sp3 and i need to upgrade my mdac to 2.6.

0
 
arbertCommented:
Remember, if you happen to be running SQL cluster 2.6 won't work--go with 2.7....

Brett
0
 
spiralAuthor Commented:
i m not using SQL cluster
0
 
spiralAuthor Commented:
points award to bruintjie because
i solved my problem using the link as a starting point for my solution.
0
 
bruintjeCommented:
glad you solved it and thanks for the grade
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

  • 8
  • 4
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now