how to get the list of database

L

Lloyd Dupont

I have a DB connection wizard.
it ask fro DB host, user name & password.

Then I *try* to show the user a list of database to connect to.
How could I get the list of database automatically with ADON.NET ?
(Not usin ADO as I'm on the PocketPC).

I repeat, I don't try to know the list of table in a db, I'm before that, I
want to know the list of db (hosted in this SqlServer).


In the past I tried a SqlConnection with a ConnectionString like
Address=myIp,myPort;User ID=sa;Pwd=password
(see, no database!)
and call the sp_databases stored procedures

However it doesn't work anymore, probably a security upgrade of SqlServer :(

However MS-SQL manager still display me th list of database, so there must
be a way....
 
L

Lloyd Dupont

mmhh... apparently the problem is with the way I pass the port
Address=ip,port;
if I remove the port it works!!!
how could I setup this port in the connection string then?????
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top