从R写入sql表时出现未知错误

时间:2019-03-13 20:11:33

标签: r sql-server function rodbc ff

要在SQL Server中打印sql表,我编写了以下函数:

writeTableSql <- function(table, dat, tablename){
#libraries
 library(RODBC)
 library(ETLUtils)
 library(ff)
 dat[] <- lapply(dat, function(x) if (is.character(x)) as.factor(x) else 
  {x})
 ETLUtils::write.odbc.ffdf(x = ff::as.ffdf.data.frame(dat), tablename = 
   tablename, odbcConnect.args = list(dsn = table, uid = "uid", pwd = 
    "***"))

}

writeTableSql("DDBBname", my_df, "table_name")

它正在运行时会停止,并在控制台中说:

Browse [1] <

有人猜怎么着呢?

0 个答案:

没有答案