Private Sub Button1_Click(ByVal sender As System.Object, ByVal e AsSystem.EventArgs) Handles Button1.Click
Call bukakoneksi()
tampil2.Connection = database
tampil2.CommandType = CommandType.Text
tampil2.CommandText = "select * from jurusan where kdjur='" & Trim(TextBox1.Text) & "'"
tampilkan = tampil2.ExecuteReader
If tampilkan.HasRows = True Then
While tampilkan.Read()
If IsDBNull(tampilkan("kdjur")) Then
TextBox2.Text = tampilkan("nmjur")
Else
TextBox2.Text = tampilkan("nmjur")
End If
End While
End If
End Sub
End Class
0 komentar:
Posting Komentar