SQL server selection | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

SQL server selection

I have developmed a software using sql as the database. I made setup file also. This was developed in vb.net. Now my question is I have given the database name as ‘MYSQLSERVER’. If the same software is installed the user nees to give the sql server name as MYSQLSERVER. Is there any alternative to select the available SQL servers on the system where my this software is installed? This is my script. ‘/ Open the connection
Dim Conn As New ADODB.Connection()
If Conn.State = ConnectionState.Open Then
End If
ConnectionString = "user id=sa;" + "password=;" + "Initial Catalog=client;" + "Data Source=MYSQLSERVER;"
strSQL_1 = "Driver={SQL Server};" & _
"Server=MYSQLSERVER;" & _
"Database=CLIENT;" & _
"Uid=sa;" & _
Conn.ConnectionString = ConnectionString
Conn.Open(strSQL_jac) Thanks

Use SQLDMO.Application and SQLDMO.NameList to populate the list of available servers. you can also try isql -L Mohan Kumar
MSSQL Database Administrator