Try Connect = New OleDbConnection("Provider=SQLOLEDB ;Data Source=Danawa;Initial Catalog=Store;Integrated Security=SSPI ") Connect.Open() cmd = New OleDbCommand ("UPDATE ItemIn SET Itemquantity= Itemquantity - '" & ItemquantityTextBox.Text & "AND" & "'Total= Total -'" & total.Text & "'WHERE ItemName= '" & ItemNameComboBox.Text & "' ", Connect) / i got an error in this line ra = cmd.ExecuteNonQuery() Catch ex As Exception MsgBox(ex.Message) End Try MsgBox(" Purchase Successfull ", MsgBoxStyle.Information) Connect.Close()
"UPDATE ItemIn SET Itemquantity = Itemquantity - " & ItemquantityTextBox.Text & ", Total= Total - " & total.Text & " WHERE ItemName= '" & ItemNameComboBox.Text & "' "
cmd = New OleDbCommand ("UPDATE ItemIn SET Itemquantity= Itemquantity - '" & ItemquantityTextBox.Text & "'," & "Total= Total -'" & total.Text & "' WHERE ItemName= '" & ItemNameComboBox.Text & "' ", Connect)
cmd = New OleDbCommand ("UPDATE ItemIn SET Itemquantity= Itemquantity - '" & ItemquantityTextBox.Text & "," & "'Total= Total -'" & total.Text & "'WHERE ItemName= '" & ItemNameComboBox.Text & "' ", Connect)
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)