*Dim connstring As String = ConfigurationManager.ConnectionStrings("ConnectionString").ConnectionString
Dim conn As New SqlConnection(connstring)
conn.Open()
Dim cmd As New SqlCommand("select from Table_1 where date_register = #" & TextBox1.Text & "#", conn)
'Dim myreader As SqlDataReader
Dim myreader As SqlDataReader = cmd.ExecuteReader
'If Not (myreader.IsDBNull(myreader.GetOrdinal("date_register"))) Then
Dim datereg As DateTime = myreader("date_register")
TextBox1.Text = datereg.ToString("MM/dd/yyyy")
'Else
' TextBox1.Text = ""
'End If
conn.Close()**
Hello, is there a solution for the error?
*Dim connstring As String = ConfigurationManager.ConnectionStrings("ConnectionString").ConnectionString Dim conn As New SqlConnection(connstring) conn.Open() Dim cmd As New SqlCommand("select from Table_1 where date_register = #" & TextBox1.Text & "#", conn) 'Dim myreader As SqlDataReader Dim myreader As SqlDataReader = cmd.ExecuteReader