[R] RODBC problems

Prof Brian Ripley ripley at stats.ox.ac.uk
Mon Mar 12 17:25:37 CET 2001


On Mon, 12 Mar 2001, Stefano wrote:

> Hi all.
>
> I'm trying to see how the package Rodbc works, with R 1.2.2, win98 and MySql 3.23.
> I'd like to export a dataset with 524 variables and 3440 records form R to MySql. I issued the following commands:
>
> library(RODBC)
> channel <- odbcConnect("test")
> sqlSave(channel,dat=totale)
>
> Error in sqlTables(channel)[, 3] : incorrect number of dimensions
>
> Actually it gave me other error messages, in previous trials *with the same commands*.
> Once it said something like ... vector maximum memory size reached...
> Another time something like ...sqlColumns(...??)  c(30,2,30...) should be a vector names
>                                                                          ^^^^^^^^^^^^^
>                                                          (these are the values in the first variable)
>
> To reduce the load I created a 1x524 dataframe (to create the table structure and then importing tha data directly from file.csv to MySql), but still I got the same error
>
> Where do I go wrong and why it gives different error messages with the same command?

I think you have a line length problem somewhere in the interfaces.

There is another option to sqlSave (fast=FALSE from memory) that you could
try, but why do you want 524 columns in a single table?  You could
export them in parts and merge them in the DBMS,

-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272860 (secr)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list