tags:

views:

18

answers:

0

I'm making a call to odbc32.dll (SQLBrowseConnect) to return a list of databases on a sql server.

From running a trace I can see the query being executed is

select name from master..sysdatabases where has_dbaccess(name)=1

If the credentials I pass aren't the sa user it returns just the system databases. Is there anyway I can use SQLBrowseConnect with another user (whose default database is also not guarenteed to be the master database) to return all databases on the server?

Also I want to avoid smo objects