Fixed syntax errors.

Fixed syntax errors, including use of old style “db1” function.