I have written my first app using a database. One of my connection string is as follows,

m_cn1.ConnectionString = "Data Source=.\SQLEXPRESS; AttachDbFilename = " & _
m_cn1mdfPath & ";Integrated Security=True; Connect Timeout=30;" & _
"User Instance=True"

I have installed this app on a few computers and all works well, but one.

My data source name on that PC is "SDCO".

My question is, is there a way to determine what the datasource name is and assign it to a string?

something like

public condatasourcename as string = my data source name on this PC

m_cn1.ConnectionString = "Data Source=.\" & condatasourcename & ; AttachDbFilename = " & _
m_cn1mdfPath & ";Integrated Security=True; Connect Timeout=30;" & _
"User Instance=True"