Hi I have created a small data access app.
I want to pull the connection string for the SQL database from a text file. But I am getting it a bit wrong can anyone help at all
Dim connStr As String = ""
Dim SqlConnection1 As SqlConnection = New SqlConnection
Dim sr As New StreamReader("C:\Program Files\MDM\ScanViewSetUp\ConnectionString.txt")
connStr = sr.ReadLine()
SqlConnection1 = connStr
I want to pull the connection string for the SQL database from a text file. But I am getting it a bit wrong can anyone help at all
Dim connStr As String = ""
Dim SqlConnection1 As SqlConnection = New SqlConnection
Dim sr As New StreamReader("C:\Program Files\MDM\ScanViewSetUp\ConnectionString.txt")
connStr = sr.ReadLine()
SqlConnection1 = connStr