Connect to Main Database

Clean up code and link all database values to the records that will
display on the CAP section