Re: [R] RODBC: longest string is truncated

From: Yeh, Richard C <>
Date: Wed 11 Oct 2006 - 22:00:12 GMT

Dear Jerome,

Sorry, I'm not running your configuration. I cannot reproduce this problem with Sybase Adaptive Server IQ 12.6 and R 2.3.1 + RODBC 1.1.7 on WinXP SP2 or Linux 2.4.21-32.0.1.ELsmp #1 SMP Tue May 17 17:52:23 EDT 2005 i686 i686 i386 GNU/Linux.

Then, in R (either platform):

> library(RODBC)
> channel = odbcConnect('DSN', believeNRows=FALSE) #
believeNRows=FALSE required for ASIQ
> b = sqlQuery(channel,"SELECT a FROM test500")
> nchar(as.vector(b[[1]]))

[1] 500 501 502

212-933-3305 / -----Original Message-----
Subject: [R] RODBC: longest string is truncated Date: Wed, 04 Oct 2006 17:55:02 -0400
Hello R community:

I'm encountering unexpected behaviour as I download string data from MySQL using the RODBC package. The unexpected behaviour is that the last character of the string is truncated. As far as I can see, this happens when some strings are of length 501 or more.

NOTICE TO RECIPIENTS: Any information contained in or attached to this message is intended solely for the use of the intended recipient(s). If you are not the intended recipient of this transmittal, you are hereby notified that you received this transmittal in error, and we request that you please delete and destroy all copies and attachments in your possession, notify the sender that you have received this communication in error, and note that any review or dissemination of, or the taking of any action in reliance on, this communication is expressly prohibited.  

Banc of America Securities LLC ("BAS") does not accept time-sensitive, action-oriented messages or transaction orders, including orders to purchase or sell securities, via e-mail.  

Regular internet e-mail transmission cannot be guaranteed to be secure or error-free. Therefore, we do not represent that this information is complete or accurate, and it should not be relied upon as such. If you prefer to communicate with BAS using secure (i.e., encrypted) e-mail transmission, please notify the sender. Otherwise, you will be deemed to have consented to communicate with BAS via regular internet e-mail transmission. Please note that BAS reserves the right to intercept, monitor, and retain all e-mail messages (including secure e-mail messages) sent to or from its systems as permitted by applicable law.  


IRS Circular 230 Disclosure:
Bank of America Corporation and its affiliates, including BAS, ("Bank of America") do not provide tax advice. Accordingly, any statements contained herein as to tax matters were neither written nor intended by the sender or Bank of America to be used and cannot be used by any taxpayer for the purpose of avoiding tax penalties that may be imposed on such taxpayer. If any person uses or refers to any such tax statement in promoting, marketing or recommending a partnership or other entity, investment plan or arrangement to any taxpayer, then the statement expressed above is being delivered to support the promotion or marketing of the transaction or matter addressed, and the recipient should seek advice based on its particular circumstances from an independent tax advisor. mailing list PLEASE do read the posting guide and provide commented, minimal, self-contained, reproducible code. Received on Thu Oct 12 08:09:23 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Thu 12 Oct 2006 - 02:30:10 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.