I'm new in using Visual C#. Can you give me bit of information as to how I can manage the data entered by a user using a form and store it in an access database?
In the application I have created, I planned of using OleDbCommand to manage the storage of data but what I usually receive is an error "An unhandled exception of type 'System.IndexOutOfRangeException' occured in system.data.dll"
"Additional Information: An OleDbParameter with ParameterName 'Check Voucher' is not contained by this OleDbParameterCollection."
This was a portion of my code.
private void RetrieveLedgerInfo()
{
objLedgerInfo.Parameters["Check Voucher"].Value =
txtCVNo.Text;
objLedgerInfo.Parameters["Payee"].Value =
txtPayee.Text;
oleDbConnection1.Open();
objLedgerInfo.ExecuteNonQuery();
oleDbConnection1.Close();
}
private void menuItem2_Click(object sender, System.EventArgs e)
{
RetrieveLedgerInfo();
}