Private Sub Deletebtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Deletebtn.Click Dim con As New SqlConnection Dim cmd As New SqlCommand Try con.ConnectionString = "Server=USRAG-L-0067215\SQLEXPRESS;Database=Alamo Products_Design Data;Trusted_Connection=True" con.Open() cmd.Connection = con cmd.CommandText = "Delete From Design_ParameterswhereDesignID=@DesignID " cmd.Parameters.Add(New SqlParameter("@DesignID", " Am I missing any value here?")) cmd.ExecuteNonQuery() If MessageBox.Show("Do you really want to Delete this Record?", "Delete", MessageBoxButtons.YesNo, MessageBoxIcon.Warning) = DialogResult.No Then MsgBox("Operation Cancelled") Exit Sub End If Catch ex As Exception MessageBox.Show("Error while deleting record on table..." & ex.Message, "Delete Records") Finally con.Close() End Try End Sub End Class
CommandText
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)