SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


DTS > ActiveX Script Task > Parse > Error on Line 2:


DTS > ActiveX Script Task > Parse > Error on Line 2:

Author
Message
CLiFF3noronha
CLiFF3noronha
Forum Newbie
Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)

Group: General Forum Members
Points: 1 Visits: 27
--------------------------------

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( )
Attachments
Erik Kutzler
Erik  Kutzler
Right there with Babe
Right there with Babe (781 reputation)Right there with Babe (781 reputation)Right there with Babe (781 reputation)Right there with Babe (781 reputation)Right there with Babe (781 reputation)Right there with Babe (781 reputation)Right there with Babe (781 reputation)Right there with Babe (781 reputation)

Group: General Forum Members
Points: 781 Visits: 1697
VBScript doesn't support mulit-line comment blocks. You're going to have to treat each line as a single-line comment.
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search