Updated to connect to the new database that is created when survey is generated. If the name contains spaces, they'll be changed to underscores for db related activity