Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
munnabhaikidarho
Starting Member
4 Posts |
Posted - 2008-12-28 : 22:14:32
|
Hi,I would like to convert the below from DTS 2000 to SSIS 2005.DTSGlobalVariables.Parent.Tasks("DTSTask_DTSExecuteSQLTask_2").CustomTask.SQLStatement = sSQLStringPlease let me know how I can do thin using .NetThanksMunna |
|
rgombina
Constraint Violating Yak Guru
319 Posts |
Posted - 2008-12-29 : 06:14:51
|
First off, what are you tring to accomplish? Rather than converting it may be a good idea and better solution in the long run to use SSIS components or scripting to do things. Tell us what you need things done and go from there. |
 |
|
munnabhaikidarho
Starting Member
4 Posts |
Posted - 2008-12-29 : 11:30:15
|
Actually I'm migrating my DTS package to SSIS 2005. The DTS performs the following tasks:It Truncates table using Execute SQL task, then in ActiveX task it runs the below ActiveX code, and then it executes a stored procedure using Execute SQL task. When I create a ActiveX task in SSIS 2005 and other Execute Tasks to truncate table and run stored procedure, I get an error "Function not found....". Now I'm not sure which function is not found.I would appreciate all your help in guiding me how to convert this DTS to SSIS. ThanksMunna'**********************************************************************' Visual Basic ActiveX Script'************************************************************************Function Main() 'Change the value of the file name on the connection Set oPackage = DTSGlobalVariables.parent Dim sSQLString Dim sDate Dim dDate Dim strResult dDate = GetRevalDate sDate = DateToName(dDate) 'SQL String sSQLString = "exec st_extract_populate_vega_swaption_work_table " & Chr(13) & _ "@RevalDate = '" & sDate & "'" DTSGlobalVariables.Parent.Tasks("DTSTask_DTSExecuteSQLTask_2").CustomTask.SQLStatement = sSQLString Main = DTSTaskExecResult_SuccessEnd FunctionFunction GetRevalDate() Dim dDate dDate = date If Weekday(dDate) = 1 Then GetRevalDate = dDate + 1 Else If Weekday(dDate) = 7 Then GetRevalDate = dDate + 2 Else GetRevalDate = dDate End If End IfEnd FunctionFunction DateToName(dDate)'Create a name based on a dateDim sYearDim sMonthDim sDay sYear = Year(dDate) If Month(dDate) < 10 Then sMonth = "0" & Month(dDate) Else sMonth = Month(dDate) End If If Day(dDate) < 10 Then sDay = "0" & Day(dDate) Else sDay = Day(dDate) End If DateToName = sYear & sMonth & sDayEnd Function |
 |
|
|
|
|