[R] line length limitation in ROracle

David James dj at research.bell-labs.com
Thu Jul 17 14:57:17 CEST 2003


Hi,

The message is

   > junk <- paste(sample(letters, size=5000, replace=T), collapse="")

   > rs <- dbSendQuery(con, junk)
   Error in oraPrepareStatement(con, statement, bind = NULL) : 
      RS-DBI driver: (too long a statement -- it must has less than 4000 chars)

so I wouldn't call it a bug -- the message clearly states what's causing
the problem.  You can easily change line 58 in RS-Oracle.h,

   #define RS_ORA_STATEMENT_LEN  4000    /* dynamic statement length */

to some other constant and re-install.  But make sure that the new limit
you pick doesn't overflow any Oracle's own buffers -- for this you'll
need to look at the Oracle Pro C/C++ Programmer's Reference Manual.

Regards,

--
David

lutz.thieme at amd.com wrote:
> Hello everybody,
> 
> I found that queries (send by "dbExecStatement" ) with more than 4000 characters
> length produces an error in ROracle (ver 0.3-3). Maybe there is a limitation of 4kB.... 
> Is this a bug? If yes, is this problem solved in the latest version of ROracle (ver 0.5-0)?
> 
> My system information:
> 
> platform sparc-sun-solaris2.8
> arch     sparc               
> os       solaris2.8          
> system   sparc, solaris2.8   
> status                       
> major    1                   
> minor    5.1                 
> year     2002                
> month    06                  
> day      17                  
> language R      
> 
> Thank you in advance for your support!
> 
> 	Kind regards,
> 
> 	Lutz
> 
> 
> 	Lutz Thieme
> 	Product Engineering
> 	AMD Saxony Limited Liability Company & Co. KG
> 	M/S E22-PE, Wilschdorfer Landstr. 101
> 	D-01109 Dresden, Gemany
> 	phone:	+ 49-351-277 -  4269
> 	fax:		+ 49-351-277-9-4269
> 
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://www.stat.math.ethz.ch/mailman/listinfo/r-help

-- 
David A. James
Statistics Research, Room 2C-253            Phone:  (908) 582-3082       
Bell Labs, Lucent Technologies              Fax:    (908) 582-3340
Murray Hill, NJ 09794-0636




More information about the R-help mailing list