Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

DTS > ActiveX Script Task > Parse > Error on Line 2: Expand / Collapse
Author
Message
Posted Thursday, March 27, 2008 11:17 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Thursday, April 17, 2014 1:31 PM
Points: 1, Visits: 25
--------------------------------

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( )


  Post Attachments 
wealth--FTP-create-File-Name--ActiveX-task--20080315.txt (8 views, 1.64 KB)
Post #475882
Posted Friday, March 28, 2008 10:27 AM
SSChasing Mays

SSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing Mays

Group: General Forum Members
Last Login: Friday, August 31, 2012 10:31 AM
Points: 633, Visits: 1,695
VBScript doesn't support mulit-line comment blocks. You're going to have to treat each line as a single-line comment.
Post #476268
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse