FAQ
Hi all,

I'm trying to get some sdo data, but running into trouble. The program
snippet:

my $connect = DBI->connect( "dbi:Oracle:****",
'****',
'****',
) || die "No connect";
#my $query = "select update_date from processed_product where id=15601";
my $query = "select geometry from processed_product where id=15601";
my $sth = $connect->prepare($query);
$sth->execute();


The result:

DBD::Oracle::db prepare failed: ERROR OCIDefineObject call needed but not
implemented yet [for Statement "select geometry from processed_product where
id=15601"] at /home/corp14/tchishol/oracleTst.pl line 11.
Can't call method "execute" on an undefined value at ...oracleTst.pl line
12.

The 'geometry' type is sdo_geometry. Anyone had luck working with this type
of data?

Thanks,
Todd

Search Discussions

  • Garrett, Philip \(MAN-Corporate\) at Jun 22, 2006 at 6:08 pm
    -----Original Message-----
    From: Todd Chisholm
    Sent: Thursday, June 22, 2006 1:54 PM
    Subject: Getting spatial data?
    my $query = "select geometry from processed_product where id=15601";
    my $sth = $connect->prepare($query);
    $sth->execute(); [snip]
    DBD::Oracle::db prepare failed: ERROR OCIDefineObject call needed but not
    implemented yet [for Statement "select geometry from processed_product where
    id=15601"] at /home/corp14/tchishol/oracleTst.pl line 11.
    You can't use native PL/SQL object types directly in Perl. You'll have
    to select just the properties you need in the select clause, like:

    select geometry.get_dims() from processed_product where id=15601
    Can't call method "execute" on an undefined value at ...oracleTst.pl line
    12.
    Just nit picking here, but don't forget "|| die $connect->errstr"
    after your prepare statement.

    Philip
  • John Scoles at Jun 22, 2006 at 6:37 pm
    Tricky one.

    The sdo_geometry is a very Oracle specific binary field as DBI and
    DBD::Oracle basically default of strings so the program dies.

    You may want to define the field as an "ora_type => ORA_CLOB" or "ORA_BLOB"
    and get it that way.

    If may work.

    I might have write a patch for it and treat it as a BLOB. (Tomorrow is my
    DBD::Oracle day so I may get to look at it)

    cheers John Scoles

    ----- Original Message -----
    From: "Todd Chisholm" <todd.chisholm@gmail.com>
    To: <dbi-users@perl.org>
    Sent: Thursday, June 22, 2006 1:54 PM
    Subject: Getting spatial data?

    Hi all,

    I'm trying to get some sdo data, but running into trouble. The program
    snippet:

    my $connect = DBI->connect( "dbi:Oracle:****",
    '****',
    '****',
    ) || die "No connect";
    #my $query = "select update_date from processed_product where id=15601";
    my $query = "select geometry from processed_product where id=15601";
    my $sth = $connect->prepare($query);
    $sth->execute();


    The result:

    DBD::Oracle::db prepare failed: ERROR OCIDefineObject call needed but not
    implemented yet [for Statement "select geometry from processed_product where
    id=15601"] at /home/corp14/tchishol/oracleTst.pl line 11.
    Can't call method "execute" on an undefined value at ...oracleTst.pl line
    12.

    The 'geometry' type is sdo_geometry. Anyone had luck working with this type
    of data?

    Thanks,
    Todd
  • Todd Chisholm at Jun 22, 2006 at 9:33 pm
    Great, thanks for your help guys. Right now, I'm getting it out with
    getvertices. Didn't know how that worked. I may try the BLOB as well, to
    streamline things, since I just need a dump of it.

    Philip, I added the die command, thanks (usually they are there...really!)

    Todd

    On 6/22/06, John Scoles wrote:

    Tricky one.

    The sdo_geometry is a very Oracle specific binary field as DBI and
    DBD::Oracle basically default of strings so the program dies.

    You may want to define the field as an "ora_type => ORA_CLOB" or
    "ORA_BLOB"
    and get it that way.

    If may work.

    I might have write a patch for it and treat it as a BLOB. (Tomorrow is my
    DBD::Oracle day so I may get to look at it)

    cheers John Scoles

    ----- Original Message -----
    From: "Todd Chisholm" <todd.chisholm@gmail.com>
    To: <dbi-users@perl.org>
    Sent: Thursday, June 22, 2006 1:54 PM
    Subject: Getting spatial data?

    Hi all,

    I'm trying to get some sdo data, but running into trouble. The program
    snippet:

    my $connect = DBI->connect( "dbi:Oracle:****",
    '****',
    '****',
    ) || die "No connect";
    #my $query = "select update_date from processed_product where id=15601";
    my $query = "select geometry from processed_product where id=15601";
    my $sth = $connect->prepare($query);
    $sth->execute();


    The result:

    DBD::Oracle::db prepare failed: ERROR OCIDefineObject call needed but not
    implemented yet [for Statement "select geometry from processed_product where
    id=15601"] at /home/corp14/tchishol/oracleTst.pl line 11.
    Can't call method "execute" on an undefined value at ...oracleTst.pl line
    12.

    The 'geometry' type is sdo_geometry. Anyone had luck working with this type
    of data?

    Thanks,
    Todd

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupdbi-users @
categoriesperl
postedJun 22, '06 at 5:54p
activeJun 22, '06 at 9:33p
posts4
users3
websitedbi.perl.org

People

Translate

site design / logo © 2022 Grokbase