Public Function InsertEmployment(ByVal strEmpId As String, ByVal strExpBucket As String, _
ByVal strOldExpBucket As String, ByVal strFromDate As String, _
ByVal strOldFromDate As String, ByVal strToDate As String, _
ByVal strCompanyName As String, ByVal strResponsibilities As String) As Int32
Dim myDB2Connection As New iDB2Connection(ConfigurationSettings.AppSettings("DB2ConnectionString"))
Dim cmdInsert As New iDB2Command("TRMSPSQL.PER0202P11_INS_EXP_REC", myDB2Connection)
cmdInsert.CommandType = CommandType.StoredProcedure
cmdInsert.Parameters.Add(New iDB2Parameter("P_EMP_ID", strEmpId))
cmdInsert.Parameters.Add(New iDB2Parameter("P_EXP_BUCKET", strExpBucket))
cmdInsert.Parameters.Add(New iDB2Parameter("P_OLD_EXP_BUCKET", strOldExpBucket))
cmdInsert.Parameters.Add(New iDB2Parameter("P_FROM_DATE", strFromDate))
cmdInsert.Parameters.Add(New iDB2Parameter("P_OLD_FROM_DATE", strOldFromDate))
cmdInsert.Parameters.Add(New iDB2Parameter("P_TO_DATE", strToDate))
cmdInsert.Parameters.Add(New iDB2Parameter("P_COMPANY_NAME", strCompanyName))
cmdInsert.Parameters.Add(New iDB2Parameter("P_RESPONSIBILITIES", strResponsibilities))
myDB2Connection.Open()
Dim dr As iDB2DataReader = cmdInsert.ExecuteReader(CommandBehavior.CloseConnection)
Dim intRecordsAffected As Int32
If dr.HasRows() Then
While dr.Read()
intRecordsAffected = dr(0)
End While
End If
dr = Nothing
Return intRecordsAffected
closeDB2(myDB2Connection)
End Function