Modified SQL queries to store full path of attachments in database.