Joo, please run the following and let me know what it gives.
db.query('SELECT * FROM sysdatabases WHERE dbid > 6')
Joo, please run the following and let me know what it gives.
db.query('SELECT * FROM sysdatabases WHERE dbid > 6')