I have previously been using a query as follows:
select * from dbo.bill where billID = #Parameters["BillID"]#
To use this I was passing in the parameter dictionary as follows:
ParameterDictionary parameters = new ParameterDictionary();
parameters.Add("BillID", id);
This is working as expected however when I add another parameter and attempt to attach it to records box by using Parameters["Tariff"] or #Parameters["Tariff"]# then I am getting an index out of range error. I have checked that the code below contains 2 parameters:
ParameterDictionary parameters = new ParameterDictionary();
parameters.Add("BillID", id);
parameters.Add("Tariff", id);
Any ideas as to what is causing this problem?