script error

Hi, I am working a script transformation in a data flow task which is calling a stored procedure. I need to pass some parameter from SSIS package - as readonly variable and pass

it as a procedure parameter. My table column is of type INT and variable is int 32 in ssis I am using the following code in the script int nd_id = (int)Convert.ToInt32(Variables.NewID); OleDbCommand mcm = new OleDbCommand("sp_1"); mcm.Parameters.Add("@param_Id", System.Data.OleDb.OleDbType.Integer); mcm.Parameters["@param_Id"].Value = nd_id ;//- Instead of using above -- variable nd_id , mcm.Parameters["@param_Id"].Value = [ I used this as well Convert.ToInt32(Variables.NewID);] Also I tried this as well mcm.Parameters.Add("@param_Id", SqlDbType.Int).Value = Convert.ToInt32(Variables.NewID); But I am getting this error Error converting data type nvarchar to Int. The provider could not determine the int32 value. Please suggest




August 16th, 2015 12:38am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics