Re: [R] sqlFetch on MySQL-DB

From: Prof Brian Ripley <ripley_at_stats.ox.ac.uk>
Date: Mon 10 Oct 2005 - 17:41:29 EST

On Mon, 10 Oct 2005, Bernd Weiss wrote:

> I successfully set up a local MySQL-database. Connecting via RODBC is
> not problem, the same in fetching 3 of 4 tables. But trying to
> connect to table 4 fails.
>
>> author<-sqlFetch(test,"author")
> Error in fromchar(unclass(x)) : character string is not in a standard
> unambiguous format

Try traceback() after an error that is lacking context: it would have helped.

> In principle I understand that error message, but I don't know any
> solution.

You have a date or datetime or timestamp column that is not in a format R recognizes. Use argument 'as.is' to bring it across as character. See ?sqlGetResults (referenced from ?sqlFetch).

-- 
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 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

______________________________________________
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
Received on Mon Oct 10 17:45:42 2005

This archive was generated by hypermail 2.1.8 : Sun 23 Oct 2005 - 18:34:14 EST