Labels

RSS

UKM

Imports System.Windows.Forms
Imports System.Data.OleDb
Imports System.Data
Public Class Form1

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

End Sub

Private Sub ButtonX2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonX2.Click
Db_anggota1.Clear()
OleDbDataAdapter1.Fill(Db_anggota1)
End Sub

Private Sub BtnInput_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtnInput.Click
Dim strCmd As OleDbCommand

Dim strSQL As String

Dim DbCmd As New OleDbCommand

Dim cnxn = New OleDbConnection(“Provider=Microsoft.Jet.OLEDB.4.0;Data Source=E:\UKM\UKM\ukm_db.mdb;Persist Security Info=False;”)

strSQL = “INSERT INTO data_anggota (Nama,NIM,Jurusan,Angkatan,Jabatan,Hp) values (‘” & TextBoxNama.Text & “‘, ” & _
“‘” & TextBoxXNim.Text & “‘,’” & TextBoxXJrusan.Text & “‘,’” & TextBoxXAngkatan.Text & “‘,’” & TextBoxXJbtan.Text & “‘,” & _
“‘” & TextBoxXHp.Text & “‘);”

strCmd = New OleDbCommand(strSQL, cnxn)

cnxn.Open()

‘MsgBox(strSQL)

DbCmd = New OleDbCommand(strSQL, cnxn)

DbCmd.ExecuteNonQuery()

cnxn.Close()

End Sub

Private Sub ButtonX1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonX1.Click

End Sub


Private Sub ButtonX3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonX3.Click

hasilnya


  • Digg
  • Del.icio.us
  • StumbleUpon
  • Reddit
  • RSS

0 komentar:

Posting Komentar

Blogger news

Popular Posts