<The parameterized query '(@bid nvarchar(5),@rid nvarchar(4000),@total float,@duedate nvar' expects the parameter '@rid', which was not supplied. >
The Error Was Occur when i doing this calling this function.
private void setBill()
{
SqlCommand cmdBill = new SqlCommand("INSERT INTO Bill (BillID, RegistrationID, TotalFees, PaymentDueDate, Status) VALUES (@bid, @rid, @total, @duedate, @status)", conOOC);
cmdBill.Parameters.AddWithValue("@bid", billID);
cmdBill.Parameters.AddWithValue("@rid", txtRegistration);
cmdBill.Parameters.AddWithValue("@total", double.Parse(lblTotalAmount.Text));
cmdBill.Parameters.AddWithValue("@duedate", dtDueDate.ToShortDateString());
cmdBill.Parameters.AddWithValue("@status", "PAID");
conOOC.Open();
cmdBill.ExecuteNonQuery();
conOOC.Close();
}
i can't find the solutions. Please Give Me A hand. Tq.