0

To print a sql table in SQL Server I wrote the following function:

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

While it is working it stops and in the console says :

Browse [1] <

Any guess what could be the issue?

Ariel
  • 157
  • 1
  • 4
  • 18
  • Looks sort of like one of the functions being called had a `browser()` line added to it for debugging purposes. Did you do that and forget to remove it? – joran Mar 13 '19 at 20:12
  • @joran no, I haven't. How do I remove it? – Ariel Mar 13 '19 at 20:23
  • The only time I've ever seen that prompt is if some code that's being run includes a call to `browser()`. It should say right above it "Called from: some_function()" which will tell you where it's coming from. – joran Mar 13 '19 at 20:25
  • It is not like that @joran, the function works properly showing that is working and then from nowhere froze and popups that message not saying where it comes from. – Ariel Mar 13 '19 at 20:29
  • 1
    In that case you'll need to provide something reproducible; without more information it's impossible to know what's going on. – joran Mar 13 '19 at 20:30
  • 1
    You could also type `where` at the browser prompt and it should tell you what function calls are active. – joran Mar 13 '19 at 20:32
  • The result of where is = where 8: do.call("sqlSave", sqlSave.args) where 9 at #7: ETLUtils::write.odbc.ffdf(x = ff::as.ffdf.data.frame(dat), tablename = tablename, odbcConnect.args = list(dsn = table, uid = "uid", pwd = "***")) where 10: writeTableSql("Asig", iris, "iris_sql") – Ariel Mar 15 '19 at 13:49

0 Answers0