Compare commits
2 Commits
9f7430a4ae
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| d3dcbc3d51 | |||
| faffd13524 |
+2
-12
@@ -157,28 +157,18 @@ server <- function(input, output) {
|
||||
print(dta)
|
||||
if (input$backup == T){
|
||||
if (! input$dbtype %in% c("UM","OV")){
|
||||
sqlBackUp(dbfile = CCfile, bu.dir="CC_BU")
|
||||
sqlBackUp(dbfile = CCfile, bu.dir="CC_BU")
|
||||
}
|
||||
if (input$dbtype == "UM"){
|
||||
sqlBackUp(dbfile = UMfile)
|
||||
}
|
||||
if (input$dbtype == "OV"){
|
||||
sqlBackUp(dbfile = OVfile)
|
||||
sqlBackUp(dbfile = OVfile)
|
||||
}
|
||||
print("Back up realizado.")
|
||||
}
|
||||
})
|
||||
|
||||
# observe({
|
||||
# if (!is.null(input$file_access)){
|
||||
# # Inicializar conexión
|
||||
# dta<<-odbcConnectAccess2007(access.file = file,
|
||||
# pwd = .rs.askForPassword("Enter password:"))
|
||||
# print(dta)
|
||||
# sqlBackUp()
|
||||
# }
|
||||
# })
|
||||
|
||||
observe({
|
||||
if (!is.null(input$file_query)){
|
||||
## Importamos los NHC de las muestras nuevas
|
||||
|
||||
+1
-1
@@ -82,7 +82,7 @@ sqlGenOVID<-function(conn=dta, nhcs=nhc.test, verb=T, sinc=F, dbtype=NULL){
|
||||
|
||||
if(length(new.nhc) > 0){
|
||||
if (nrow(dbid) == 0){next.num<-1}else{
|
||||
next.num<-gsub(db["dbcode"],"",dbid[,db["dbcode"]]) %>% as.numeric %>% max(na.rm=T)+1
|
||||
next.num<-gsub(db["dbpref"],"",dbid[,db["dbcode"]]) %>% as.numeric %>% max(na.rm=T)+1
|
||||
}
|
||||
print(next.num)
|
||||
last.num<-next.num+(length(new.nhc)-1)
|
||||
|
||||
Reference in New Issue
Block a user