?
Solved

can't create activex component runtime error

Posted on 2003-03-23
14
Medium Priority
?
326 Views
Last Modified: 2012-06-21

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
Comment
Question by:spiral
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 8
  • 4
  • 2
14 Comments
 
LVL 44

Expert Comment

by:bruintje
ID: 8189589
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
 

Author Comment

by:spiral
ID: 8189775
yes i include dtspkg.dll, custtask.dll
and 1 more dll which belonsg to dts
but it gives me that runtime error
0
 
LVL 34

Expert Comment

by:arbert
ID: 8190563
There are more dependencies than that spiral.  

Check this out:

http://support.microsoft.com/default.aspx?scid=kb;en-us;315661
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:spiral
ID: 8193428
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
 
LVL 44

Expert Comment

by:bruintje
ID: 8193441
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
 

Author Comment

by:spiral
ID: 8193471
its
"run-time error '-2147287038 (80030002)
The system cannot find the file specified."

the error i got.
0
 
LVL 44

Accepted Solution

by:
bruintje earned 150 total points
ID: 8193482
0
 

Author Comment

by:spiral
ID: 8193585
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
 

Author Comment

by:spiral
ID: 8193589
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
 

Author Comment

by:spiral
ID: 8215018
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
 
LVL 34

Expert Comment

by:arbert
ID: 8215079
Remember, if you happen to be running SQL cluster 2.6 won't work--go with 2.7....

Brett
0
 

Author Comment

by:spiral
ID: 8242547
i m not using SQL cluster
0
 

Author Comment

by:spiral
ID: 8242552
points award to bruintjie because
i solved my problem using the link as a starting point for my solution.
0
 
LVL 44

Expert Comment

by:bruintje
ID: 8243253
glad you solved it and thanks for the grade
0

Featured Post

Percona Live Europe 2017 | Sep 25 - 27, 2017

The Percona Live Open Source Database Conference Europe 2017 is the premier event for the diverse and active European open source database community, as well as businesses that develop and use open source database software.

Question has a verified solution.

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

JSON is being used more and more, besides XML, and you surely wanted to parse the data out into SQL instead of doing it in some Javascript. The below function in SQL Server can do the job for you, returning a quick table with the parsed data.
In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
Via a live example, show how to setup several different housekeeping processes for a SQL Server.
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.
Suggested Courses

762 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