Professional Documents
Culture Documents
VB Prak
VB Prak
Connection
conn.Open
End Sub
Call koneksi
End Sub
Form2.Show
End Sub
Adodc1.Recordset.Delete
DataGrid1.Refresh
End Sub
Private Sub Command4_Click()
Call koneksi
rs.Open "SELECT * FROM buku WHERE kode_buku='" & a & "'", conn
Else
Form4.Show
Form4.Text1.Text = rs.Fields("kode_buku")
Form4.Text2.Text = rs.Fields("judul")
Form4.Text3.Text = rs.Fields("pengarang")
Form4.Text4.Text = rs.Fields("penerbit")
Form4.Text5.Text = rs.Fields("tahun")
End If
conn.Close
End Sub
Form3.Show
Form3.Text1.Text = DataGrid1.Columns(0)
Form3.Text2.Text = DataGrid1.Columns(1)
Form3.Text3.Text = DataGrid1.Columns(2)
Form3.Text4.Text = DataGrid1.Columns(3)
Form3.Text5.Text = DataGrid1.Columns(4)
End Sub
Klik add muncul
conn.Open
End Sub
Call koneksi
End Sub
Call koneksi
rs.Open "select*from buku where kode_buku='" & Text1.Text & "'", conn
Else
sql = "INSERT INTO buku (kode_buku,judul,pengarang,penerbit,tahun) VALUE ('" & Text1.Text & "','" &
Text2.Text & "','" & Text3.Text & "','" & Text4.Text & "','" & Text5.Text & "')"
conn.Execute sql
End If
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Text5.Text = ""
conn.Close
Form1.Adodc1.Refresh
End Sub
conn.Open
End Sub
Call koneksi
End Sub
Call koneksi
sql = "UPDATE buku SET kode_buku='" & Text1.Text & "', judul='" & Text2.Text & "', pengarang='" &
Text3.Text & "', penerbit='" & Text4.Text & "', tahun='" & Text5.Text & "' where kode_buku ='" &
Text1.Text & "'"
conn.Execute sql
conn.Close
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Text5.Text = ""
Form1.Adodc1.Refresh
Unload Me
End Sub
conn.Open
End Sub
Call koneksi
End Sub
Call koneksi
sql = "UPDATE buku SET kode_buku='" & Text1.Text & "', judul='" & Text2.Text & "', pengarang='" &
Text3.Text & "', penerbit='" & Text4.Text & "', tahun='" & Text5.Text & "' where kode_buku ='" &
Text1.Text & "'"
conn.Execute sql
conn.Close
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Text5.Text = ""
Form1.Adodc1.Refresh
Unload Me
End Sub
Call koneksi
Dim hapus As String
hapus = "DELETE FROM buku where kode_buku='" & Text1.Text & "'"
conn.Execute hapus
conn.Close
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Text5.Text = ""
Form1.Adodc1.Refresh
Unload Me
End Sub
PEMINJAMAN
End Sub
Call koneksi
End Sub
view_anggota.Show
End Sub
Text2.Enabled = False
Command2.Enabled = False
End Sub
If KeyAscii = 13 Then
Call koneksi
rs.Open "SELECT * FROM anggota WHERE kode_anggota='" & Text1.Text & "'", conn
Label4.Caption = rs.Fields("nama")
Label5.Caption = rs.Fields("kontak")
Adodc1.Refresh
With Adodc1.Recordset
Adodc1.Refresh
End With
rsl.Open "select * from peminjaman where kode_anggota='" & Text1.Text & "' and status='1'", conn
If rsl.EOF = False Then
Text2.Enabled = False
Command2.Enabled = False
Else
Text2.Enabled = True
Command2.Enabled = True
End If
'conn.close
Else
Text1.Text = ""
End If
conn.Close
End If
End Sub
conn.Open
End Sub
Private Sub from_load()
Call koneksi
End Sub
Call koneksi
rs.Open "select * from login where username='" & Text1.Text & "' and password='" & Text2.Text & "'",
conn
menu_utama.Show
Else
End If
Text1.Text = ""
Text2.Text = ""
conn.Close
End Sub
Unload Me
End Sub
Text1.Text = ""
Text2.Text = ""
End Sub