' create action
loActionStringBuilder.Append("SP_UPDATE_EQUIP_REC")
' add parameters
loFbSqlHelperParameterStructure = New BlackFalconAB.Firebird.FbSqlHelperParameterStructure()
loFbSqlHelperParameterStructure.PARAMETER_FBSQLDBTYPE = FirebirdSql.Data.FirebirdClient.FbDbType.Integer
loFbSqlHelperParameterStructure.PARAMETER_NAME = "PI_KEY_IN"
loFbSqlHelperParameterStructure.PARAMETER_DIRECTION = ParameterDirection.Input
loFbSqlHelperParameterStructure.PARAMETER_VALUE = poEquipmentStructure.EQUIPMENT_TYPE_KEY
loParameterArrayList.Add(loFbSqlHelperParameterStructure)
loFbSqlHelperParameterStructure = New BlackFalconAB.Firebird.FbSqlHelperParameterStructure()
loFbSqlHelperParameterStructure.PARAMETER_FBSQLDBTYPE = FirebirdSql.Data.FirebirdClient.FbDbType.VarChar
loFbSqlHelperParameterStructure.PARAMETER_NAME = "PS_NAME_IN"
loFbSqlHelperParameterStructure.PARAMETER_SIZE = 50
loFbSqlHelperParameterStructure.PARAMETER_DIRECTION = ParameterDirection.Input
loFbSqlHelperParameterStructure.PARAMETER_VALUE = poEquipmentStructure.EQUIPMENT_NAME
loParameterArrayList.Add(loFbSqlHelperParameterStructure)
loFbSqlHelperParameterStructure = New BlackFalconAB.Firebird.FbSqlHelperParameterStructure()
loFbSqlHelperParameterStructure.PARAMETER_FBSQLDBTYPE = FirebirdSql.Data.FirebirdClient.FbDbType.VarChar
loFbSqlHelperParameterStructure.PARAMETER_NAME = "PS_DESCRIPTION_IN"
loFbSqlHelperParameterStructure.PARAMETER_SIZE = 200
loFbSqlHelperParameterStructure.PARAMETER_DIRECTION = ParameterDirection.Input
loFbSqlHelperParameterStructure.PARAMETER_VALUE = poEquipmentStructure.EQUIPMENT_DESCRIPTION
loParameterArrayList.Add(loFbSqlHelperParameterStructure)
loFbSqlHelperParameterStructure = New BlackFalconAB.Firebird.FbSqlHelperParameterStructure()
loFbSqlHelperParameterStructure.PARAMETER_FBSQLDBTYPE = FirebirdSql.Data.FirebirdClient.FbDbType.Integer
loFbSqlHelperParameterStructure.PARAMETER_NAME = "PI_EQUIPMENT_TYPE_KEY_IN"
loFbSqlHelperParameterStructure.PARAMETER_DIRECTION = ParameterDirection.Input
loFbSqlHelperParameterStructure.PARAMETER_VALUE = poEquipmentStructure.EQUIPMENT_TYPE_KEY
loParameterArrayList.Add(loFbSqlHelperParameterStructure)
loFbSqlHelperParameterStructure = New BlackFalconAB.Firebird.FbSqlHelperParameterStructure()
loFbSqlHelperParameterStructure.PARAMETER_FBSQLDBTYPE = FirebirdSql.Data.FirebirdClient.FbDbType.Integer
loFbSqlHelperParameterStructure.PARAMETER_NAME = "PI_EFFECTIVE_MOVEMENT_OFFSET_IN"
loFbSqlHelperParameterStructure.PARAMETER_DIRECTION = ParameterDirection.Input
loFbSqlHelperParameterStructure.PARAMETER_VALUE = poEquipmentStructure.EQUIPMENT_MOVEMENT_OFFSET
loParameterArrayList.Add(loFbSqlHelperParameterStructure)
loFbSqlHelperParameterStructure = New BlackFalconAB.Firebird.FbSqlHelperParameterStructure()
loFbSqlHelperParameterStructure.PARAMETER_FBSQLDBTYPE = FirebirdSql.Data.FirebirdClient.FbDbType.Integer
loFbSqlHelperParameterStructure.PARAMETER_NAME = "PI_EFFECTIVE_RANGE_IN"
loFbSqlHelperParameterStructure.PARAMETER_DIRECTION = ParameterDirection.Input
loFbSqlHelperParameterStructure.PARAMETER_VALUE = poEquipmentStructure.EQUIPMENT_EFFECTIVE_RANGE
loParameterArrayList.Add(loFbSqlHelperParameterStructure)
loFbSqlHelperParameterStructure = New BlackFalconAB.Firebird.FbSqlHelperParameterStructure()
loFbSqlHelperParameterStructure.PARAMETER_FBSQLDBTYPE = FirebirdSql.Data.FirebirdClient.FbDbType.Integer
loFbSqlHelperParameterStructure.PARAMETER_NAME = "PI_EFFECTIVE_MAX_RANGE_IN"
loFbSqlHelperParameterStructure.PARAMETER_DIRECTION = ParameterDirection.Input
loFbSqlHelperParameterStructure.PARAMETER_VALUE = poEquipmentStructure.EQUIPMENT_MAX_EFFECTIVE_RANGE
loParameterArrayList.Add(loFbSqlHelperParameterStructure)
loFbSqlHelperParameterStructure = New BlackFalconAB.Firebird.FbSqlHelperParameterStructure()
loFbSqlHelperParameterStructure.PARAMETER_FBSQLDBTYPE = FirebirdSql.Data.FirebirdClient.FbDbType.Integer
loFbSqlHelperParameterStructure.PARAMETER_NAME = "PI_MUNITIONS_COUNT_IN"
loFbSqlHelperParameterStructure.PARAMETER_DIRECTION = ParameterDirection.Input
loFbSqlHelperParameterStructure.PARAMETER_VALUE = poEquipmentStructure.EQUIPMENT_MUNITIONS_COUNT
loParameterArrayList.Add(loFbSqlHelperParameterStructure)
loFbSqlHelperParameterStructure = New BlackFalconAB.Firebird.FbSqlHelperParameterStructure()
loFbSqlHelperParameterStructure.PARAMETER_FBSQLDBTYPE = FirebirdSql.Data.FirebirdClient.FbDbType.Integer
loFbSqlHelperParameterStructure.PARAMETER_NAME = "PI_RECORDS_AFFECTED_OUT"
loFbSqlHelperParameterStructure.PARAMETER_DIRECTION = ParameterDirection.Output
loParameterArrayList.Add(loFbSqlHelperParameterStructure)
' execute insert
Try
liRecordsAffected = loFbSqlHelper.ExecuteNonQuery(csConnectionString, loActionStringBuilder.ToString(), loParameterArrayList)
loFbSqlHelperParameterStructure = New BlackFalconAB.Firebird.FbSqlHelperParameterStructure()
loFbSqlHelperParameterStructure = DirectCast(loParameterArrayList(8), BlackFalconAB.Firebird.FbSqlHelperParameterStructure)
liRecordsAffected = 1
'liRecordsAffected = Convert.ToInt32(loFbSqlHelperParameterStructure.PARAMETER_VALUE.ToString().Trim())
Catch loFbException As FirebirdSql.Data.FirebirdClient.FbException
Return (-2) ' firebird exception
Catch loException As Exception
Return (-1) ' general exception
End Try
Return (liRecordsAffected)
End Function
Please let me know if you require any further information.