Kamis, 30 Agustus 2012

Koneksi Visual Basic 6 Dengan Database Microsoft Access



Dim dbbarang As ADODB.Connection
Dim KONEKSI As String


Private Sub Form_Load()
Set dbbarang = New ADODB.Connection
KONEKSI = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=f:\database\stok.mdb"

adobarang.ConnectionString = KONEKSI
adobarang.RecordSource = "select * from Barang "
adobarang.Refresh

adohistori.ConnectionString = KONEKSI
adohistori.RecordSource = "select * from masuk  histori  day(tanggal)= " & Day(Date) & " and month(tanggal)=" & Month(Date) & " and Year(tanggal)=" & Year(Date) & ""
adohistori.Refresh
adohistori.Refresh


Tidak ada komentar:

Posting Komentar

hay friend... sebelum exit, jgn lupa tinggalkan comment dulu ya...
kalau mau bertanya bisa tulis komentar atau email/fb ke: aranama@ymail.com
thank you...