I changed my data source from an access-db to a sql-server, now i still have to fix some problems
When I want to load a value from a sql-database into my web form (to display a default value), I get an ExecuteReader error ("Connection-property not initialized").
I dont know where to set the connection property in my code.
Dim con As New System.Data.SqlClient.SqlConnection()
Dim myCommand As New System.Data.SqlClient.SqlCommand
Dim SqlCon As String = "Data Source=blablabla\SQLEXPRESS;Initial Catalog=Bill;Persist Security Info=True;User ID=xxx;Password=password"
con.ConnectionString = SqlCon
Dim reader As System.Data.SqlClient.SqlDataReader = myCommand.ExecuteReader()
The error occurs in the last line. Do I have to set the connection property in the SqlCon string?
View Complete Post