Modified the insertRecordIntoTableNamed method