Wednesday, April 13, 2011

Delete records(vb.net 2003)

Public Sub Delete_Item()

        oledbcon.Open()
        strSQL = "delete from tblitem where Itemno='" & txtino.Text & "'"
        Dim cmd As OleDb.OleDbCommand = oledbcon.CreateCommand
        cmd.CommandText = strSQL
        cmd.ExecuteNonQuery()
        MsgBox("1 Item Delete Successfully !", MsgBoxStyle.Information, "Delete Item")
        oledbcon.Close()

    End Sub

No comments:

Post a Comment