R/closeExt.R

Defines functions disconnect

Documented in disconnect

# Author: 	Jorrel Khalil S. Aunario, jaunario@gmail.com
# Date: 24 February 2009
# Version 0.1.1  
# License GPL3

disconnect <- function(channel, clean=TRUE, env=.GlobalEnv){
    odbcClose(channel)
    if (clean){
        objs <- ls(envir=env)
        for (obj in objs){            
            cobj <- get(obj, envir=env)
            if(class(cobj)=="RODBC"){
                if (cobj==channel){
                    rm(list=obj, envir=env)
                }
            }
        }   
    }    
}

Try the rodbcExt package in your browser

Any scripts or data that you put into this service are public.

rodbcExt documentation built on May 2, 2019, 5:25 p.m.