Fix database connecting
Fix sql:build error messages