I'm using ado.net and i need to create a connection wizard that will have drop-downs for all of the current sql server connection, and the related tables for the selected sql server. With this I will create my connection string.
ConnString = "Data Source=SQLServer;" & _
"Initial Catalog=Database;" & _
"User ID=sa;" & _
"Password=password;"
I have found part of what I am looking for in the registry. Below is the registry key I access to find the SQL Server names.
What I can't seem to find is a list of databases??? If anyone can help me it would be appreciated, I've been searching the web for awhile and can't seem to get anywhere.
Dan
ConnString = "Data Source=SQLServer;" & _
"Initial Catalog=Database;" & _
"User ID=sa;" & _
"Password=password;"
I have found part of what I am looking for in the registry. Below is the registry key I access to find the SQL Server names.
Code:
myReg.LocalMachine.OpenSubKey("SOFTWARE\Microsoft\MSSQLServer\Client\SuperSocketNetLib\LastConnect")
What I can't seem to find is a list of databases??? If anyone can help me it would be appreciated, I've been searching the web for awhile and can't seem to get anywhere.
Dan