RODBC sqlSave column types: as defined?

I'm trying to understand how RODBC defines the column types of a newly created table (Access)? The R sqlSave documentation is very cryptic: "types are selected by consulting the varTypes and typeInfo parameters." And there are no examples for these arguments. Where can I find a better explanation?

+5
source share
2 answers

No need to look at the sources. Use "getSqlTypeInfo (driver)" instead.

> getSqlTypeInfo("ACCESS")
$double
[1] "DOUBLE"

$integer
[1] "INTEGER"

$character
[1] "VARCHAR(255)"

$logical
[1] "varchar(5)"

> 
+1
source

Just look at the sources of the RODBC package.

# from R/TypeInfo.R:
typesR2DBMS <-
    list(MySQL = list(double="double", integer="integer",
         character="varchar(255)", logical="varchar(5)"),
         ACCESS = list(double="DOUBLE", integer="INTEGER",
         character="VARCHAR(255)", logical="varchar(5)"),
         # etc ...
+6
source

All Articles