spiral
asked on
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("sFil
oPKG.GlobalVariables("sTab
oPKG.GlobalVariables("sHea
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.GetExecutionErrorInf
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
ASKER
yes i include dtspkg.dll, custtask.dll
and 1 more dll which belonsg to dts
but it gives me that runtime error
and 1 more dll which belonsg to dts
but it gives me that runtime error
There are more dependencies than that spiral.
Check this out:
http://support.microsoft.com/default.aspx?scid=kb;en-us;315661
Check this out:
http://support.microsoft.com/default.aspx?scid=kb;en-us;315661
ASKER
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?
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?
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
ASKER
its
"run-time error '-2147287038 (80030002)
The system cannot find the file specified."
the error i got.
"run-time error '-2147287038 (80030002)
The system cannot find the file specified."
the error i got.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
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("sFil eName").Va lue = Trim(txtFileName.Text)
oPKG.GlobalVariables("sTab leName").V alue = Trim(xlsString)
oPKG.GlobalVariables("sHea derName"). 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.GetExecutionErrorInf o 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
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("sFil
oPKG.GlobalVariables("sTab
oPKG.GlobalVariables("sHea
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.GetExecutionErrorInf
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
ASKER
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("sFil eName").Va lue = Trim(txtFileName.Text)
oPKG.GlobalVariables("sTab leName").V alue = Trim(xlsString)
oPKG.GlobalVariables("sHea derName"). 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.GetExecutionErrorInf o 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
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("sFil
oPKG.GlobalVariables("sTab
oPKG.GlobalVariables("sHea
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.GetExecutionErrorInf
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
ASKER
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.
its due to the downward compatibility of sql server sp2 and sp3 and i need to upgrade my mdac to 2.6.
Remember, if you happen to be running SQL cluster 2.6 won't work--go with 2.7....
Brett
Brett
ASKER
i m not using SQL cluster
ASKER
points award to bruintjie because
i solved my problem using the link as a starting point for my solution.
i solved my problem using the link as a starting point for my solution.
glad you solved it and thanks for the grade
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