Professional Documents
Culture Documents
Imports System.Data.Odbc
Public Class Form1
Dim Conn As OdbcConnection
Dim da As OdbcDataAdapter
Dim ds As DataSet
Dim str As String
Dim CMD As OdbcCommand
Dim RD As OdbcDataReader
& "',alamatagt='" & TextBox3.Text & "',teleponagt='" & TextBox4.Text & "' where
nomoragt='" & TextBox1.Text & "'"
CMD = New OdbcCommand(edit, Conn)
CMD.ExecuteNonQuery()
MsgBox("Data berhasil di Edit", MsgBoxStyle.Information,
"Information")
Call KondisiAwal()
End If
End Sub
Sub KondisiAwal()
TextBox1.Text = ""
TextBox2.Text = ""
TextBox3.Text = ""
TextBox4.Text = ""
Koneksi()
da = New OdbcDataAdapter("Select * from anggota ", Conn)
ds = New DataSet
ds.Clear()
da.Fill(ds, " anggota ")
DataGridView1.DataSource = (ds.Tables("anggota"))
End Sub
TextBox4.Text = ""
TextBox2.Focus()
Else
TextBox2.Text = RD.Item("namaagt")
TextBox3.Text = RD.Item("alamatagt")
TextBox4.Text = RD.Item("telponagt")
TextBox2.Focus()
End If
End If
End Sub
End Class