Hi please help me in this code, it gives always error on execution of command is comes.
Try
DBconnect()
cmd.CommandText = "Designation_INSERT"
cmd.Connection = con
cmd.CommandType = CommandType.StoredProcedure
'Fill the Parameters of Store Procedure
Param = cmd.Parameters.AddWithValue("@DesignationID", TxtDesigCode.Text)
Param = cmd.Parameters.AddWithValue("@DesignationName", TxtDesigName.Text)
Param = cmd.Parameters.AddWithValue("@ApprovedBy", TxtDesigApproved.Text)
cmd.ExecuteNonQuery() 'Error Comes on this line
MsgBox("Data Successfully Added!")
DBClose()
Catch ex As Exception
MsgBox(ex.Message, MsgBoxStyle.OkOnly, "Please Check!")
End Try