Selecting varray using python

Maan Hamze mmhamze at pleiades.net
Thu Sep 6 02:31:58 CEST 2001


Amin
I am positive that DCOracle does not support Oracle 8i, and you are better
off with DCOracle2 since it supports Oracle 8 OCI extensions along with
Python DB API 2.
The latest DCOracle2 is for Python 2.1.0 (make sure you do not have Python
2.1.1) and it is in development beta 5 release.
For docs check:
http://www.zope.org/Members/matt/dco2/dco2doc
I am at home now so I have no way to connect to an Oracle 8 (we use 8.1.6 at
work and we connect to it using DCOracle2 with Python 2.1.0 and things have
been running fine) to try something along the same lines.
But it is much better to either send an e-mail with the problem to:
matt at zope.org
Matt Kromer is the developer of DCOracle2.
I am sure he'll be able to help you, and if it is a bug, all the better.
He'll know at least.
Maan

Also, if you run into such problems with
"Amin Abdulghani" <aminabdu at paul.rutgers.edu> wrote in message
news:f5b09a2f.0109051103.5fd00eea at posting.google.com...
> In the makefile for DCOracle threre is a setup  for 8i also, so my
> guess was DCOracle supports 8i. Select clauses where columns have
> atomic values seem to be OK.
>
> Anyhow I tried the whole thing again with DCOracle2. This time
> again something strange happened:
>
> 1) I have a table "test2" with 2 columns "id" and "arrcol". Arrcol
> is of type "arrtype" which is a varray of varchar.
>
> 2) This is what I inserted to the table test2:
>
> insert into test2 values (1, arrtype('john','paul'));
>
> 3) Selecting from sqlplus returns:
> select * from test2
>
>      1, ARRTYPE('john', 'paul')
>
> 4) Now using python I type
>
> >>> db = DCOracle2.connect("...")
> >>> c= db.cursor()
> >>> c.execute("select * from test2")
> 1
> >>> c.description
> [('ID', 'NUMBER', 22, 22, 38, 0, 1), ('ARRCOL', 'TYPE', 2000, 2000, 0, 0,
1)]
> >>> c.fetchone()
> Segmentation fault (core dumped)
>
> I was expecting a list to be returned. Anyone familiar with Varrays able
> to help out?
>
> Thanks..
> Amin
>
> "Maan M. Hamze" <mmhamze at pleiades.net> wrote in message
news:<tpcbeh5irano9f at corp.supernews.com>...
> > Amin
> > You lost me here.  Are you sure that DCOracle works with Oracle 8i?  I
know
> > that DCOracle2 does.
> > Maan
> >
> > "Amin Abdulghani" <aminabdu at paul.rutgers.edu> wrote in message
> > news:f5b09a2f.0109041358.20f1290d at posting.google.com...
> > > Hi,
> > >
> > > I have recently installed DCOracle 1.3.2 to interface Oracle 8i
> > > with python. The problem I seem to be facing is trying to access
> > > a varray column using the interface. Does anyone have anyone





More information about the Python-list mailing list