to help pinpoint the issue, how do you insert a text, let's say of 8000 
chars, into Oracle, using python and the cxOracle driver ?

On Monday, August 3, 2015 at 5:51:16 PM UTC+2, Boris Aramis Aguilar 
Rodríguez wrote:
>
> Hi,
>
> I've been currently working with Oracle as a database backend, I have 
> found one issue that I highly suspect has to do with the DAL Adapter; when 
> you use web2py text fields they get mapped into CLOB with oracle database 
> backend (as you can see on the OracleAdapter code) the issue is dealing 
> with text longer than 4k characters. Oracle doesn't support a typical 
> insert with more than 4k characters dealing with a CLOB data type, because 
> it treats it as a string and strings can't be more than 4k characters long. 
> So for example dealing with a table like
>
> db.define_table('atable', Field('longtext', 'text'))
>
> db.atable.insert(longtext=somelongtext) #This fails with the following 
> exception
>
>   File "/var/www/web2py/gluon/packages/dal/pydal/objects.py", line 691, in 
> insert
>     ret = self._db._adapter.insert(self, self._listify(fields))
>   File "/var/www/web2py/gluon/packages/dal/pydal/adapters/base.py", line 731, 
> in insert
>     raise e
> DatabaseError: ORA-01704: string literal too long
>
> And reading trough several forums I found that this error appears on CLOB 
> insertion when you do a tipycal insert. 
> https://community.oracle.com/thread/1068414?start=0&tstart=0
>
> So i guess OracleAdapter is trying to achieve a typical insertion when it 
> shouldn't as it has to deal with CLOB logic.
>
> I think I could fix the problem but I'm not really sure if someone can help 
> me out with a hint of some kind.
>
> Thanks!
>
>
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to