I just was not understanding exactly how this worked before. I have since
worked throught the problem.
Function Main()
'Get Category Information
'DTSGlobalVariables("Category").Value
'Get TimeID Information
'DTSGlobalVariables("TimeID").Value
Dim oPkg, oDataPump, sSQLStatementCat, sSQLStatementTime
' Build new SQL Statement
sSQLStatementCat = "UPDATE dbo.OLS_Parms " & _
"SET dbo.OLS_Parms.Val = '" & DTSGlobalVariables("Category").Value & "' "
& _
"WHERE dbo.OLS_Parms.Parm = 'CrossAppCategory'"
' Get reference to the Exec SQL Task
Set oPkg = DTSGlobalVariables.Parent
Set oExecSQL = oPkg.Tasks("DTSTask_DTSExecuteSQLTask_1").CustomTask
' Assign SQL Statement to Exec SQL Task
oExecSQL.SQLStatement = sSQLStatementCat
' Clean Up
Set oExecSQL = Nothing
Set oPkg = Nothing
Main = DTSTaskExecResult_Success
End Function
Now here is my new question......
When I run this DTS package from within a SQL Job, why doesn't the input box
display?
[quoted text, click to view] "txksa" wrote:
> I am currently using an inputbox to do this. I am new to this kind of stuff.
> I am trying to actually figure out how to execute a sql string within the
> activex script task.
>
> "Bharat Jariwala" wrote:
>
> > you can use inputBox function and catch user input to DTSGlobalVariables("Category").Value.
> >
> > **********************************************************************
> > Sent via Fuzzy Software @
http://www.fuzzysoftware.com/ > > Comprehensive, categorised, searchable collection of links to ASP & ASP.NET resources...