March 27, 2008 at 11:17 pm
--------------------------------
3/28/2008 1:09:15 AM
3/28/2008 9:38:13 AM
From: cLiff2noronha@gmaiL.com
DTS > ActiveX Script Task > Parse > Error on Line 2: expected end of stmt
All,
How can I have a multi-line comment(s) in MS VBscript ?
Script is attached.
I am trying to replace ssis syntax with simpler DTS syntax from a book , msdn website , BoL etc.
In Active X , when I Parse >
Getting Error on Line 2: expected end of stmt
--------------------------------
' tweaked to create filename from today's date and deliver it as input to FTP Task
Function Main ()
Dim FTP_FileName as string
Dim @Today As String
'comment _Today = Format(DateTime.Now.Subtract(New TimeSpan(23, 0, 0)), "MMddyyyy")
' @Today = Format$ (Date$ () , "MMddyyyy")
@Today = FormatDateTime ( Date , 2 )
Dim variables As Variable
If Dts.Variables.Contains("User::V_FileName") = True Then
Dts.Variables("User::V_FileName").Value = "/phlw/IPM_Wealth_Report_" + @Today + ".xls"
End If
If Dts.Variables.Contains("User::V_DMIReportLocal") = True Then
Dts.Variables("User::V_DMIReportLocal").Value = "E:\Logs\DMI\Current\IPM_Wealth_Report_" + @Today + ".xls"
End If
Dts.TaskResult = Dts.Results.Success
FTP_FileName = Dts.Variables("User::V_FileName").Value
DTSGlobalVariables("FTP_FileName").Value = FTP_FileName
If DTSGlobalVariables("FTP_FileName").Value <> "" Then
Main = DTSTaskExecResult_Success
Else
Main = DTSTaskExecResult_Failure
End If
End Function
' R&D ---
Date
FormatDateTime( )
March 28, 2008 at 10:27 am
VBScript doesn't support mulit-line comment blocks. You're going to have to treat each line as a single-line comment.
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply