Re: [cx-oracle-users] Getting CLOB values
Brought to you by:
atuining
|
From: Michael M. <mi...@ma...> - 2004-08-18 10:51:38
|
Hi
On 21 Jul 2004, at 21:58, Anthony Tuininga wrote:
> You'll need to provide more information. Specifically what Oracle
> __client__ software you are using and what version of cx_Oracle you
> are using. In addition, could you try making the connection using a
> tns entry from a tnsnames.ora file or something equivalent? That might
> be the source of the issue as well.
>
Just back from a holiday - sorry for the delay in replying.
Here is the extra information,
Client version Release 9.2.0.1.0 - Developer's Release
cx_Oracle version 4.0.1
I'll try to make the connection using the tns entry also - although the
connection and query run fine as long as I don't try to get the clob
using python - If I use to_char() to return a string instead it works
fine.
thanks
Michael
> Michael Maibaum wrote:
>
>> Hi,
>>
>> I'm rather new to Python so please excuse any mind blowingly dumb
>> errors below....
>>
>> I'm trying to write a script to download and format data from Oracle
>> one column of which is a CLOB. I've hit a problem with my script
>> shown with the minimal test case below
>>
>>
>> Mac OS X 10.3.4,
>> python 2.3.4 (non-framework build (as cx_Oracle didn't build against
>> the framework one...) )
>> connecting to 9i on Solaris
>>
>> (password and host information removed..)
>>
>> ######
>> #!/opt/local/bin/python
>>
>> import cx_Oracle
>>
>> user = 'mike'
>> password = '...'
>> sid = '.....'
>> host = '....'
>> port = 1521
>>
>> dsn = cx_Oracle.makedsn(host,port,sid)
>> connect = cx_Oracle.connect(user,pass,dsn)
>> cursor = connect.cursor()
>>
>> cursor.execute("select aa_seq from gene3d_admin.g3d_seq")
>>
>> for value, in cursor:
>> value.read()
>>
>> #####
>>
>> Traceback (most recent call last):
>> File "test.py", line 19, in ?
>> value.read()
>> cx_Oracle.InternalError: No Oracle error?
>>
>> I can get the non-CLOB columns with no problem. I'm confident I'm
>> doing something dumb but extensive googling hasn't helped... any
>> ideas?
>>
>
>
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by BEA Weblogic Workshop
> FREE Java Enterprise J2EE developer tools!
> Get your free copy of BEA WebLogic Workshop 8.1 today.
> http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click
> _______________________________________________
> cx-oracle-users mailing list
> cx-...@li...
> https://lists.sourceforge.net/lists/listinfo/cx-oracle-users
>
|