Cara Update tabel database Mysql di Vb 6.0

untuk meng-update tabel data atau merubah data tabel

menggunakan listing coding “update  namatabel set ‘ “  & Text1 & “ ‘, “

dan berikut contoh listing codingnya :

Private sub cubah_click()

Dim ubah as string

if tkode = “ “ Then

Msgbox “Data masih kosong “,Vbinformation,”INFO”

else

if isi = false then

ubah = “update tabeldetail set ‘ “ & tkode & “ ‘,’ “ & tnama & “ ‘,’ “ & tpengambilan & “’ ‘,’ “ & tbagian & “ ‘,’ “ & tstok & “ ‘ where KD_Sparepart = “ tkode “

set rstabeldetail = adodb.Execute(ubah , , adcmdText)

semula

bersih

end if

end if

end sub

 

dan penjelasan codingnya :

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s