Error from repeated calls to connect/ disconnect #112
Labels
enhancement
New functionality that could be added
help wanted
Will probably not be addressed by the package maintainer, but could be addressed by someone else
In trying to run this study from @Xintong-Li-ZnCu the repeated calls to connect and disconnect to the database here
CohortMethod/R/DataLoadingSaving.R
Line 158 in 79b86e4
causes problems running on sidiap´s postgres database (at some point we get an error with a connect call failing). I have seen this before when working with the database myself, but avoided it by leaving the connection to the database open throughout an analysis.
My current way of getting past this for the current project has been to add the option to open the connection to the database at the start of the CodeToRun for the study package, by adding an additional argument to the function here and making this an if statement so it only connects/ disconnect if the connection is not already open and specified.
I am not sure whether you would actually want this functionality in CohortMethod (I will try and work with our database manager to see if this is just being caused by a security setting with our database that can be changed), but for awareness I thought I´d raise this as a possible issue.
The text was updated successfully, but these errors were encountered: