Are you able to connect to the tables using what your host control panel has. Such as MyPHPAdmin?
If so ftp to the site. Then goto config.inc.php in the includes folder and double check your database settings. It should be the first couple of lines in the file.