Table name sorting and small bugfix

The old version (1.3) had table names in alfabetical order on the Browse Data table, but version 2.0 has not. Also the program crashes if you try to execute a query without a database open.

This patch adds sorting to the table name combobox and displays a message when trying to execute a query without a database open.