Quantcast
Channel: SQL Server Integration Services forum
Viewing all articles
Browse latest Browse all 24688

SSIS (BIDS 2005) - Script Component Error: (Error 30203: Identifier Expected.)

$
0
0

Hi I have the following error on a script component and cannot figure out why:

Error at Data Flow Task [Script Component [1604]]: Error 30203: Identifier expected.

Line 139   Column 31 through 47

Error 30203: Identifier expected.

Line 144   Column 31 through 54

Error at Data Flow Task [Script Component [1604]]: Error 30203: Identifier expected.

Line 139   Column 31 through 47

Error 30203: Identifier expected.

Line 144   Column 31 through 54

This is my code:

' Microsoft SQL Server Integration Services user script component
' This is your new script component in Microsoft Visual Basic .NET
' ScriptMain is the entrypoint class for script components
Imports System
Imports System.Data
Imports System.Data.SqlClient
Imports System.Math
Imports Microsoft.SqlServer.Dts.Runtime
Imports Microsoft.SqlServer.Dts.Pipeline.Wrapper
Imports Microsoft.SqlServer.Dts.Runtime.Wrapper
Imports Microsoft.SqlServer
Public Class ScriptMain
    Inherits UserComponent
    Private connMgr As IDTSConnectionManager90
    Private sqlconn As SqlConnection
    Private sqlcmd As SqlCommand
    Private sqlParam As SqlParameter
    Public Overrides Sub AcquireConnections(ByVal Transaction As Object)
        connMgr = Me.Connections.HSMEquipment
        sqlconn = CType(connMgr.AcquireConnection(Nothing), SqlConnection)
    End Sub
    Public Overrides Sub PreExecute()
        sqlcmd = New SqlCommand("Select sum(cast(working_day as int)) wd from DBG.TB_Calendar Where Calendar_Date > @StartDate and Calendar_Date <= GetDate()", sqlconn)
        sqlParam = New SqlParameter("@StartDate", SqlDbType.Date)
        sqlcmd.Parameters.Add(sqlParam)
    End Sub
    Public Overrides Sub Input0_ProcessInputRow(ByVal Row As Input0Buffer)
        sqlcmd.Parameters("@StartDate").Value = Row.OrderConfirmationSent
        Row.OCRDateDiff = Convert.ToString(sqlcmd.ExecuteScalar())
        '
    End Sub
    Public Overrides Sub ReleaseConnections()
        connMgr.ReleaseConnection(sqlconn)
    End Sub
End Class

Any help is much appreciated!

Thanks

Tim


Tim


Viewing all articles
Browse latest Browse all 24688

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>