Monday, March 12, 2012

illegal variable name/number error in script component

Hi There,

I am trying to populate a table in Oracle Db using SSIS. For some reason, I get this error..

illegal variable name/number

This is what I have....

Public Overrides Sub PreExecute()

oracleCmd = New OracleCommand("INSERT INTO Temp(ID) VALUES(@.KEY)", oracleConn)

oracleParam = New OracleParameter("@.KEY", OracleType.Number)

oracleCmd.Parameters.Add(oracleParam)

End Sub

Public Overrides Sub Input0_ProcessInputRow(ByVal Row As Input0Buffer)

'With oracleCmd

.Parameters("@.KEY").Value = CType(Row.KEY, OracleClient.OracleNumber)

.ExecuteNonQuery()

End With

End Sub

==

Row.Key returns a row from the oracel table which has one column of type numeric..

Can somebody please help me?

Thanks a lot!!

Question... What is @.KEY?

Also, why aren't you using an OLE DB destination?

No comments:

Post a Comment