Skip to content

line length limitation in ROracle

2 messages · lutz.thieme@amd.com, David James

#
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
#
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: