bee1ef2ca8e2b8367c04696a115b0c97c7324d2a
FAQ/Questions/ExecuteReader-requires-an-open-and-available-connection.md
| ... | ... | @@ -0,0 +1,25 @@ |
| 1 | +#ExecteReader requires an open and available connection when state is open |
|
| 2 | + |
|
| 3 | +[[_TOC_]] |
|
| 4 | + |
|
| 5 | +##Question |
|
| 6 | + |
|
| 7 | +How do I resolve problems with the error message "ExecuteReader requires an open and available Connection. The connection's current state is open" that occur intermittently? |
|
| 8 | + |
|
| 9 | +##Answer |
|
| 10 | + |
|
| 11 | +If you are not using a customized method of obtaining your datasources from the database, you may see the following error when lots of concurrent users are accessing the application: |
|
| 12 | + |
|
| 13 | +``` |
|
| 14 | +ExecuteReader requires an open and available Connection. The connection's current state is open. |
|
| 15 | + |
|
| 16 | +Stacktrace: |
|
| 17 | +at Izenda.AdHoc.Database.Driver.GetDataSet(IDbCommand command, String reportPart) |
|
| 18 | +at Izenda.AdHoc.Database.Driver.GetDataTable(IDbCommand command, String reportPart) |
|
| 19 | +at Izenda.AdHoc.Database.Driver.GetDataTable(Report report, IDbCommand command) |
|
| 20 | +at Izenda.AdHoc.Report.LoadAndFormatData(ReportOutputOptions options) |
|
| 21 | +at Izenda.AdHoc.ReportSet.LoadData(ReportOutputOptions options, Boolean useCache, Boolean invalidateInCache, Boolean export, Boolean previewInDesigner, String& signature, Object& renderedReportSet, CacheRecordOptions& cacheOptions, String additionalKey, Boolean removeHiddenFilters) |
|
| 22 | +``` |
|
| 23 | + |
|
| 24 | +To solve this, you should implement [[MARS(MultipleActiveResultSets)|http://msdn.microsoft.com/en-us/library/cfa084cz(v=vs.80).aspx]] in your connection string. This is accomplished by simply adding "MultipleActiveResultSets=True;" to your connection string. |
|
| 25 | + |