Fixing problem handling MS SQL server database.