Need help with syntax error

Nima

New member
Joined
Jun 23, 2010
Messages
2
Programming Experience
Beginner
Hey guys,

I'm a dumb nobe in VB.NET. wrote the following code and keep getting syntax error for the highlighted line. Any idea why?

Thanks

VB.NET:
    Private Sub btn_choose_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_choose.Click

        Dim conn As New SqlConnection("Data Source=.\SQLEXPRESS;Initial Catalog=dbMotionProject;Integrated Security=True")
        Dim cmdString As String = "SELECT * From(dbo.Customers) where(Number = txt_input.Text"
        Dim cmd As New SqlCommand(cmdString, conn)

        conn.Open()
        [COLOR="Red"]Dim reader As SqlDataReader = cmd.ExecuteReader[/COLOR]
        While reader.Read

            MessageBox.Show("Company Name" & reader(0))

        End While
        conn.Close()
 
Back
Top