Ok that is what I need.
I checked the latest source and OCIDefineObject is not there (but we knew
that). Having a quick look at the OIC docs we may need to initialized the
OCI environment in Object mode beforehad which I do not think we do right
now.
I will have to check to see how hard that is Later this week when I get
some more time.
Cheers
----- Original Message -----
From: "Charles Pareto" <[EMAIL PROTECTED]>
To: "'John Scoles'" <[EMAIL PROTECTED]>
Cc: <dbi-users@perl.org>; <[EMAIL PROTECTED]>
Sent: Wednesday, June 06, 2007 12:18 PM
Subject: RE: DBD-Oracle VARRAY not supported
Sure, here is my example-
I'm declaring a column as type varray like this:
"CREATE TYPE phone as varray(20) of varchar2(30)"
I then insert phone numbers into the varray like this:
insert into ADDRESS values (phone('949-933-5680', '949-600-5866',
'949-699-3608'))
This creates a column of varray where I can store up to 20 phone numbers
in
that one column field.
When I select this column to see my phone numbers I will see this:
PHONE
--------------------------------------------------------
PHONE('949-933-5680', '949-600-5866', '949-699-3608')
When I try and return this column using DBD-Oracle with the statement
"select phone from address"
I get the error message like below.
prepare failed: ERROR OCIDefineObject call needed but not implemented yet
[for Statement "select phone from address"]
I read somewhere that objects aren't implemented in DBD-Oracle and this is
what I'm trying to find out.
Thanks,
Chuck
Charles Pareto
Brand Protection Engineer
[EMAIL PROTECTED]
408-525-5505
-----Original Message-----
From: John Scoles [mailto:[EMAIL PROTECTED]
Sent: Wednesday, June 06, 2007 3:46 AM
To: [EMAIL PROTECTED]
Cc: dbi-users@perl.org
Subject: Re: DBD-Oracle VARRAY not supported
'varray' haven't hear of that in years. At least not since Nested Tables
came along . I aways thoght they were for PL/SQL only.
I will have a look at them later this week. I am just wondering how one
want
to look at the data in DBI??
Can you give me a quick working example of what you want to do and an
example of what you want to see in the end?
cheers
John Scoles
----- Original Message -----
From: "Tim Bunce" <[EMAIL PROTECTED]>
To: "Charles Pareto" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>; <dbi-users@perl.org>
Sent: Wednesday, June 06, 2007 4:39 AM
Subject: Re: DBD-Oracle VARRAY not supported
On Tue, Jun 05, 2007 at 05:03:23PM -0700, Charles Pareto wrote:
Hi Tim,
[...] All I'm looking for is a way to select a column that is defined
as type varray.
Is there any way this can be accomplished using DBD-Oracle or
anything
else?
For simple data you could use SQL statements to convert the info into a
string.
There are probably better ways (returning ref cursor, pipelined function
etc)
but I'm a little out of touch with Oracle these days. Check google and
the archives.
Of course, the best option would be to implement proper support for
varrays.
That's probably not to difficult. I'll say "patches welcome" on behalf of
Pythian,
who are the lead maintainers.
Tim.
p.s. Don't use cpanforum. Very few people read it. The dbi-users@perl.org
list
is the best place to get help.