0

i got problem to save the record after edit the record..

this the error
Operator '&' is not defined for string "UPDATE RekodAnggaran SET Nama='A" and type 'DataRowView'.

code save

Private Sub btnsimpan_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnsimpan.Click
        con.Open()
        [B]sql = ("UPDATE RekodAnggaran SET Nama='" & txtNama.Text & "', TarikhLahir='" & txtTarikhLahir.Text & "', Alamat='" & txtAlamat.Text & "',NoTelefon='" & txtNoTelefon.Text & "', Status='" & cmbStatus.SelectedItem & "', TarikhMI='" & DTPMI.Value.ToShortDateString & "', JPembayaran='" & cmbJPembayaran.SelectedItem & "', Pelan='" & cmbPelan.SelectedItem & "', Umur='" & cmbPremium.SelectedItem & "' WHERE [NoIC]='" & txtNoIC.Text & "'")[/B]
        da = New OleDb.OleDbDataAdapter(sql, con)
        da.Fill(ds)
        con.Close()

    End Sub

the bold is error

2
Contributors
1
Reply
2
Views
8 Years
Discussion Span
Last Post by sknake
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.