I am developing a package that provides easier access to pull information from a database
I create a database connect object (oracle) using
con <- DBI::dbConnect(odbc::odbc(), dsn=server,uid=uid,pwd=pwd, timeout = 10)
con
is then passed to various functions in the package to pull certain kinds of data.
Every time i build my package the con
object is no longer valid. It is still in memory and on inspection appears ok however it is rejected by the database. So i have to create a new connection object. I don't understand why building a package would do this.
Is this a DBI error, or user error, or something else?
Any ideas?