| 1 | Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click |
| 2 | Using conn As New Data.SqlClient.SqlConnection(SqlDataSource1.ConnectionString) |
| 3 | Dim command As New Data.SqlClient.SqlCommand("select name from student where id =123; ", conn) |
| 4 | conn.Open() |
| 5 | Dim reader As Data.IDataReader |
| 6 | reader = command.ExecuteReader() |
| 7 | While reader.Read() |
| 8 | |
| 9 | |
| 10 | Dim name As String = reader.GetString(0) |
| 11 | |
| 12 | End While |
| 13 | TextBox1.Text = name |
| 14 | End Using |
| 15 | End Sub |
| 16 | End Class |
I am a newbie, so there maybe have many erro.....
Visual Studio tell me the biggest erro on the line 13
but I dont know what wrong it is, can anyone tell me pls?
I am using asp.net connecting mysql