Dear Experts

How to findout computer / server name with vb.net codes.

I want to use it in connection string

con = New Data.SqlClient.SqlConnection("Data Source=noor;" & _
                  "Initial Catalog=accounts;Integrated Security=True")

Please help

You can get the client computer name with Environment.MachineName .

To get the SQL Server's name you can submit this query:

Select Cast(@@SERVERNAME as varchar)