Oops! Please change the following group of lines (in the 'display current database setting' section) - it gives a neater output in the event 2 or more databases happen to be already set:
echo ERROR: Multiple current databases set
for /l %%i in (1,1,!total_current_databases!) do (
echo !Current_DataBase[%%i]!
)
to:
echo ERROR: Multiple current databases set
echo.
for /l %%i in (1,1,!total_current_databases!) do (
echo !Current_DataBase[%%i]!
)