Using Visual Basic 2010 Express trying to get a connection:
There is something wrong with my connectionStr.
Where is the error in the connectionStr?
Code:
Imports System.Data.SqlClient
connectionStr="Data Source=.\SQLEXPRESS;AttachDbFilename="C:\path\Database1.mdf";Integrated Security=True;Connect Timeout=30;User Instance=True"
Dim conn As SqlConnection
conn = New SqlConnection(connectionStr)
conn.Open()Where is the error in the connectionStr?