Are you certain that the code is allowing you to connect to the database correctly? Obviously we have no way of testing this.