Description Usage Arguments Value Author(s) See Also Examples
If the acckey.pem file already exists, it extracts the
cipher text from it and decrypt it into key string. Otherwise, it will call
inputPwd
to enter the password.
Note that this function returns an encrypted raw vector which needs
to be decrypted using decrypt_it()
.
1 2 3 | getRawPwd(pem = "acckey", overide = FALSE)
get_raw_pwd(pem = "acckey", overide = FALSE)
|
pem |
character, the name of the .pem file. Default 'acckey'. |
overide |
logical, if overide existing acckey.pem and input password again. Default FALSE. |
invisible (an encrypted raw vector)
Yiying Wang, wangy@aetna.com
1 2 3 4 5 6 7 8 9 10 | ## Not run:
qry_acc <- function(dbname, query) {
con <- DBI::dbConnect(odbc::odbc(), .connection_string=paste0(
"Driver={Microsfot Access Driver (*.mdb, *.accdb)};",
"Dbq=", dbname, ";uid=;pwd=", decrypt_it(get_raw_pwd())))
return(DBI::dbGetQuery(con, query))
}
qry_acc("testdb.accdb", query="select * from table1")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.