Domanda

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".

È stato utile?

Soluzione

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]).

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top