Previously I had used this line and it worked but currently this line will give an error about 'already open datareader' (unless altering config file):
DynamicRecordList records = Library.GetRecordsFromForm(FormID); (20 seconds)
Now I have switched to the line(s):
var records1 = new RecordStorage();
var records = records1.GetAllRecords(form); (30 seconds)
The code is in a custom controller that passes a filtered/sorted/custom list (just a couple columns from the records). The time is specifically on the lines before I am able to run my own code (checked during debugging).
The only fix I have seen for the datareader involves updating a connection string and that seemed to work alright but I don't want to change specific sites' connections (it feels like a hack). It also means something I have to change for any site (we have many) that might use this code. I also don't know the other ramifications of changing that configuration.
Either way the load time is very bad and we only have 140 records for the form so far.
Were you able to resolve the datareader issue without editing the config file? My site has this issue as well. Maybe we could compare notes. I am also interested in how you do sorting in your custom controller. Thanks
Speediest way to get all form records
Umbraco 7.3.8 Umbraco forms 4.3.2
I am trying to get all form records. I have two different examples of how to do this from this question: https://our.umbraco.org/forum/umbraco-forms/78207-working-with-record-data-there-is-already-an-open-datareader-associated
Previously I had used this line and it worked but currently this line will give an error about 'already open datareader' (unless altering config file):
Now I have switched to the line(s):
The code is in a custom controller that passes a filtered/sorted/custom list (just a couple columns from the records). The time is specifically on the lines before I am able to run my own code (checked during debugging).
The only fix I have seen for the datareader involves updating a connection string and that seemed to work alright but I don't want to change specific sites' connections (it feels like a hack). It also means something I have to change for any site (we have many) that might use this code. I also don't know the other ramifications of changing that configuration.
Either way the load time is very bad and we only have 140 records for the form so far.
Is there anything I can do to speed it up?
Hi Rhebel,
Were you able to resolve the datareader issue without editing the config file? My site has this issue as well. Maybe we could compare notes. I am also interested in how you do sorting in your custom controller. Thanks
Dom
is working on a reply...