Typing in my connection name I see a line like DBQ=Path\to\DB
. How do I retrieve this value? I have tried
conn$DBQ
conn[DBQ]
conn['DBQ']
conn[,'DBQ']
None return the value. I tried typeof(conn)
and got "integer"
, class(conn)
-> "RODBC"
, mode(conn)
-> "numeric"
.
I think there is no simple way. You could get connection string by attr(conn, "connection.string")
and then try to parse it (e.g.: sub("^DBQ=([^=]*);.*", "\\1", attr(a,"connection.string"))
or strsplit(attr(a,"connection.string"),";")[[1]][1]
).