Private Sub btnok_Click(sender As Object, e As EventArgs) Handles btnok.Click If Con.State = ConnectionState.Open Then Con.Close() End If Dim query As String Dim credit, debit As Double Dim dt As DateTime dt = dtpicker1.Value.Date credit = CDbl(txtcredit.Text) debit = CDbl(txtdebit.Text) query = "update invoice set [credit]='" & CDbl(txtcredit.Text) & " ' ,[debit]= ' " & CDbl(txtdebit.Text) & " ',[dated]=' " & dtpicker1.Value.Date & " ' where [ac_no]= ' " & Integer.Parse(txtacno.Text) & " '" Dim cmd = New OleDbCommand Con.Open() cmd.CommandText = query cmd.Connection = Con cmd.ExecuteNonQuery() Con.Close() MsgBox("Successfully edited ") End Sub
<br /> query = "update invoice set [credit]='" & CDbl(txtcredit.Text) & " ' ,[debit]= ' " & CDbl(txtdebit.Text) & " ',[dated]=' " & dtpicker1.Value.Date & " ' where [ac_no]=" & txtacno.Text<br />
set [credit]= [credit] + '55'
''
Dim query As String Dim credit, debit As Double Dim dt As DateTime dt = dtpicker1.Value.Date credit = CDbl(txtcredit.Text) debit = CDbl(txtdebit.Text) query = "update invoice set [credit]='" & CDbl(txtcredit.Text) & " ' ,[debit]= ' " & CDbl(txtdebit.Text) & " ',[dated]=' " & dtpicker1.Value.Date & " ' where [ac_no]= ' " & Integer.Parse(txtacno.Text) & " '" Dim cmd = New OleDbCommand Con.Open() cmd.CommandText = query cmd.Connection = Con cmd.ExecuteNonQuery() Con.Close() MsgBox("Successfully edited ")
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)