Paul MacManus <paul.macmanus <at> gmail.com> writes:

> Using the fast=F option, sqlSave saves without matching column names.
> It looks like a bug to me..........
.... 
> In other words, sqlSave didn't check column names, it simply mapped
> column 1 to column 1 and column 2 to column 2.

This seems to be a problem with SQLServer. The following example with 
Access works correctly for me, even if I close the connection in between. 
(Win2k, R 2.4.0)

Dieter Menne

-----
library(RODBC)
channel <- odbcConnectAccess("db1.mdb")
df <- data.frame(T=1, S=10)
sqlSave(channel, df, "test", rownames=F)
#odbcClose(channel)

#channel <- odbcConnectAccess("db1.mdb")
df <- data.frame(S=20, T=2)
sqlSave(channel, df, "test", rownames=F, append=T,fast=T)
odbcClose(channel)

______________________________________________
R-help@stat.math.ethz.ch 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