changed sql queries to work with the main database and cnanched connection string to point to the main database.