[R] sqlSave, fast=F option, bug?

Dieter Menne dieter.menne at menne-biomed.de
Wed Oct 18 17:06:01 CEST 2006


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)



More information about the R-help mailing list