Re: [R] RODBC problems

About this list Date view Thread view Subject view Author view

From: Prof Brian Ripley (ripley@stats.ox.ac.uk)
Date: Tue 13 Mar 2001 - 02:25:37 EST


Message-ID: <Pine.GSO.4.31.0103121621150.6361-100000@toucan.stats>

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@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@stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._


About this list Date view Thread view Subject view Author view

This archive was generated by hypermail 2b30 : Fri 22 Jun 2001 - 18:58:36 EST