i am planning to make my data source to auto detect the file path of my .mdf file and my current code is this
Private Sub Form2_Load(sender As Object, e As EventArgs) Handles MyBase.Load
con.ConnectionString = "Data Source=
(LocalDB)\MSSQLLocalDB;AttachDbFilename=C:\Users\xxeno\source\repos\Keyboard Part Picker
Layout(2)\keyboardpartpickerDB.mdf;Integrated Security=True"
If con.State = ConnectionState.Open Then
con.Close()
End If
con.Open()
disp_data()
End Sub
i any solution so that it "auto-detects the attach db filename?