field tabel divisi : KODE(PK), NAMA

....

dim rs as recordset

set rs = new recordset
rs.open "select * from divisi", conn, adOpenStatic, adLockOptimistic

'nambah
rs.addnew                       'nambahkan record baru
rs!KODE = '1'                   'isi field
rs!NAMA = 'Marketing'
rs.update                       'menyimpan data ke database
                                
'edit -> sikat aja langsung
rs!Nama = 'Pemasaran'           'isi/ganti/edit field
rs.Update                       'menyimpan perubahan


'hapus
rs.delete                       'satu perintah aja

......


catatan :
query select-nya harus updatable. pengalaman sy, sampeyan g bisa 
memperlakukan cara di atas untuk query spt ini

"select a.kode, a.nama, b.kode, b.nama from divisi a, subdivisi b 
 where a.kode = b.kodedivisi"

yg updateable yg gimana? yg ngambil dari 1 tabel. kalo make access, 
yg hubungan antar tablenya make join (iya kah? lupa2 ingat), ga make 
where

solusinya, make printah sql...

SQL = "bla bla bla...."
conn.Execute SQL

itu yg sy tahu. kalo ada salah moho dikoreksi teman2

salam, 
Huda





Untuk keluar dari millis ini, kirim email kosong ke:
[EMAIL PROTECTED]

 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/programmer-vb/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Kirim email ke