Imports Oracle.DataAccess.Client Public Class Form1 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim oradb As String = "Data Source=orcl;User Id=hr;Password=hr;" Dim conn As New OracleConnection(oradb) conn.Open() Dim cmd As New OracleCommand cmd.Connection = conn cmd.CommandText = "select NAMA from siswa where NRP=1" cmd.CommandType = CommandType.Text Dim dr As OracleDataReader = cmd.ExecuteReader() dr.Read() Label1.Text = dr.Item("NAMA") conn.Dispose() End Sub Private Sub DataGridView1_CellContentClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) End Sub Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click Dim oradb As String = "Data Source=orcl;User Id=hr;Password=hr;" Dim conn As New OracleConnection(oradb) conn.Open() Dim strSql As String Try strSql = "insert into siswa values('" & txtnrp.Text & "','" & txtnama.Text & "','" & txtalamat.Text & "','" & txtnotelp.Text & "')" Dim cmd As OracleCommand = New OracleCommand(strSql, conn) Dim icount As Integer = cmd.ExecuteNonQuery If icount > 0 Then MsgBox(txtnama.Text & " siswa added to your library") Else MsgBox(txtnrp.Text & " cannot be added to your library") End If Catch ex1 As Exception MsgBox(ex1.Message) End Try End Sub End Class