Source Code Prosedur Simpan pada VB 6.0

dibawah ini contoh source code prosedur simpan pada VB 6.0 dengan menggunakan database SQL Server 2003

Private Sub SIMPANDATA_Click()

Dim ADOINDRA As ADODB.Recordset
'----------- simpan data
If txtCustID.Text <> "" Then
DbCon.Execute SQL
SQL = " insert into INDRA " _
& " (RM,NAMA,TANGGAL,NOTA ,UNIT,OBAT,TINDAKAN, " _
& " IMUNISASI,KARCIS,GIZI,TOTAL,status, " _
& " Perusahaan) " _
& " values('" & txtCustID.Text & "','" & txtCustN.Text & "', " _
& " '" & dtpFaktur.Value & "', " _
& " '" & txtFakturID.Text & "','" & Txtpolyn.Text & "', " _
& "'" & TOBAT.Text & "','" & TTINDAKAN.Text & "'," _
& "'" & TIMUN.Text & "','" & TKARCIS.Text & "','" & TGIZI.Text & "', " _
& "'" & TTOTAL.Text & "','" & TStat.Text & "','" & Txtnamapershpas.Text & "')"
DbCon.Execute SQL
End If
End Sub

5 thoughts on “Source Code Prosedur Simpan pada VB 6.0

  1. mau tanya mas, klo kita mau simpan data yang berasal dari option button contoh jenis kelamin (laki-laki / perempuan) pakai insert into gmn caranya ya???

Tinggalkan Balasan

Isikan data di bawah atau klik salah satu ikon untuk log in:

Logo WordPress.com

You are commenting using your WordPress.com account. Logout / Ubah )

Gambar Twitter

You are commenting using your Twitter account. Logout / Ubah )

Foto Facebook

You are commenting using your Facebook account. Logout / Ubah )

Foto Google+

You are commenting using your Google+ account. Logout / Ubah )

Connecting to %s