Improve error handling

- Add an error encoding setting (some unixODBC drivers do not use UTF-8)
- Add a verbose setting to error handling
- Add an error for empty statement text