Hi,

I'm able to establish a successful odbc connection using RODBC 1.3-2 on Win
7 and R 2.12.0. But I'm getting the following error message when I try to
save a data frame into the debase as shown below.

library(RODBC)
bbdb <- odbcConnect("bbdb")
odbcGetInfo(bbdb) # returns ok
sqlSave(bbdb, USArrests, rownames = "state", addPK=TRUE) #  example from the
RODBC manual

Error in sqlSave(bbdb, USArrests, rownames = "state", addPK = TRUE) :
  [RODBC] ERROR: Could not SQLExecDirect 'CREATE TABLE "USArrests"  ("state"
varchar(255) NOT NULL PRIMARY KEY, "Murder" double, "Assault" integer,
"UrbanPop" integer, "Rape" double)'

Thanks in advance,
Lars.

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to