[DB-SIG] Returning floats in DCOracle2

jno jno@glasnet.ru
29 Nov 2002 16:56:14 +0300


--=-5X0nhpnnsi12xADBzbrr
Content-Type: text/plain; charset=KOI8-R
Content-Transfer-Encoding: quoted-printable

could not reproduce:

[jno@hypnos jno]$ python                                               =20
Python 2.1.3 (#2, Jul 24 2002, 11:13:04) [C] on hp-uxB
Type "copyright", "credits" or "license" for more information.
>>> import DCOracle
>>> d =3D DCOracle.Connect('xxx/xxx@xxx')
>>> c =3D d.cursor()
>>> c.execute('select 0.5 from dual')
>>> r=3Dc.fetchall()
>>> c.close()
>>> print r
[(0.5,)]
>>>=20
[jno@hypnos jno]$ uname -a
HP-UX hypnos B.11.00 U 9000/800 654339382 unlimited-user license
[jno@hypnos jno]$=20

well, it is NOT DCO2, Py 2.2.2 and HP-UX 11.11 ;-)

-jno

=F7 =F0=D4=CE, 29.11.2002, =D7 12:57, Alexei Ustyuzhaninov =CE=C1=D0=C9=D3=
=C1=CC:
> Hi!
>=20
> I have ran into a silly problem with DCOracle2. It returns wrong float=20
> numbers from SELECT statement.
>=20
> bash-2.04$ cat test.py
> import DCOracle2
> db =3D DCOracle2.connect("x/y@z")
> c =3D db.cursor()
> c.execute("SELECT 0.5 FROM DUAL")
> print c.fetchone()
>=20
> bash-2.04$ python test.py
> [3.6097722056218853]
>=20
> Unfortunately 0.5 is somewhat different from 3.6097722056218853.
> The environment is:
> HP-UX 11.11
> python 2.2.2
> DCOracle2 1.2
>=20
> Could somebody give me a tip on the problem please?
>=20
> --=20
> Best regards,
> Alexei Ustyuzhaninov
>=20
>=20
> _______________________________________________
> DB-SIG maillist  -  DB-SIG@python.org
> http://mail.python.org/mailman/listinfo/db-sig


--=-5X0nhpnnsi12xADBzbrr
Content-Type: application/pgp-signature; name=signature.asc
Content-Description: This is a digitally signed message part

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQA953H+ev10erQBAdYRAnPdAKDH3O5WYzkNTIcrsLTjekUvypv5hgCeKo8H
YHjuDVDtapQzliEJd0ZByWE=
=gLE8
-----END PGP SIGNATURE-----

--=-5X0nhpnnsi12xADBzbrr--