[DB-SIG]DCOracle2 rounded floats

Benjamin DULON BDULON at sqli.com
Tue May 18 10:31:32 EDT 2004


Hello,
 
I'm newbie in DCO2 and python, and I encounter an issue.
In Oracle8i, I try to get Number data type. From SQLPlus, no problem, but
using dco2, floats are rounded.
Instead of having 0.975 I get 1.0
My code : 
 
            Conn = DCOracle2.connect(connect_string)
            C = conn.cursor()
            c.execute('select * from t_sqli where id=4')
            r = c.fetchall()
            print entry
 
It returns : [4.0,'QUATRE','d',3.0]
 
It should be : [4,'QUATRE','d',3.1414155225]
 
Trying directly in using sqlplus : no problem.
The environnement is Python2.2, DCO2, RedHat9, Oracle8.1.7
 
Thanks a lot.
 
Benjamin DULON.
 
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/db-sig/attachments/20040518/aabc3ae7/attachment.html


More information about the DB-SIG mailing list