Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Selecting a long with DBI/DBD Oracle
I am using the DBI/DBD perl modules to select a long from a database. I can't
get it to work. I have seen the bind param and a LongTruncOk command. Here is
my code. What do I need to make this work?
Table definition:
SYNOPSIS LONG LOCATION VARCHAR2(64)
PERL code:
#!/usr/local/bin/perl -Tw
use DBI;
use DBD::Oracle qw(:ora_types);
BEGIN { $ENV{ORACLE_HOME} = '/opt/app/oracle/product/7.3.4'; $ENV{TWO_TASK} = 'foo.bar';
or die "Unable to connect: $DBI::errstr";
my $query = "select synopsis , location from solicitation";
my $sth= $dbh->prepare($query) or die "Prepare failed: $DBI::errstr";
$sth->execute;
while(@row = $sth->fetchrow() ) {
print @row, "\n\n";
}
$sth->finish();
$dbh->disconnect();
--
Brian E. Lavender
US Army Corps of Engineers -- Programmer / Systems Analyst
Sacramento, CA (916) 557-6623
-----------== Posted via Deja News, The Discussion Network ==---------- http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own Received on Thu Apr 29 1999 - 19:53:09 CDT
![]() |
![]() |