Problem populating execute using @array.

2002-09-18 Thread Dolan, Mark

I am trying to update a table in an Oracle database. I am reading an
input file which has 
the column names for the database as the first record in the file. The
data begins in the second row. I read the first record to pull off the
column names. I create the sql using placeholders. I then read the rest
of the file. At the end of the loop I attempt to perform the 'execute'
using the statement handle of the database. I get the following error.

DBD::Oracle::st execute failed: ORA-01722: invalid number (DBD ERROR:
OCIStmtExecute) at ./ins line 61, <$FH> line 1. 

At the time of the execute @ins = "20", "2", "Hello, Dolly", "000",
"01", "022" 


# assume sth is a valid statement handle 
# assume $FH is a handle to an opened file 
my $columns = <$FH>; 
# 
# read first record of input file 
# split the column headers 
# 
  my $columnitem; 
  chomp($columns); 
  @ins = split /\|/, $columns; 
  foreach $columnitem (@ins) { 
   $columnitem = "\"".$columnitem."\""; 
  } 
my $formatcolumns=join ( ', ', @ins ); 
my $valstring= join ( ', ' , ('?') x scalar @ins ); 
my $sql= "INSERT INTO $table ( $formatcolumns ) VALUES ( $valstring) "; 
while ( my $line = <$FH> ) 
{ 
# 
# split the data fields 
# 
 chomp($line); 
 my $field; 
 @ins = split /\|/, $line; 
 foreach $field (@ins) { 
$field = "\"".$field."\","; 
 } 
 chop($ins[-1]); # remove comma from last item in array 
 #the actual sequence 
 $sth->execute(@ins) or $err++; 
} 




Supra DBI driver

2002-09-10 Thread Dolan, Mark

Has anyone seen or heard of a Supra DBI driver. Supra is a DB2-Like
Database. Any help would be greatly appreciated.  Thanks ! ! !




FW: DBD::Oracle with Oracle 9

2002-09-05 Thread Dolan, Mark



 -Original Message- 
From:   Dolan, Mark  
Sent:   Thursday, September 05, 2002 8:58 AM 
To: Perl Users help (E-mail) 
Subject:DBD::Oracle with Oracle 9 

I am having problems trying to make my DBD driver for Oracle. I have
built perl-5.8.0 and DBI-1.3. When I try to build DBD::Oracle I get the
following error when I run make.

We have Oracle 9 on our system which is 64-bit. If you have any
suggestions I would greatly appreciate them - Thanks ! ! !



Running Mkbootstrap for DBD::Oracle () 
chmod 644 Oracle.bs 
rm -f blib/arch/auto/DBD/Oracle/Oracle.sl 
LD_RUN_PATH="/opt/oracle/ora92/lib" /usr/bin/ld  -b
+vnocompatwarnings -L/usr/local/lib Oracle.o dbdimp.o oci7.o oci8.o
/opt/oracle/ora92/rdbms/lib/defopt.o -o
blib/arch/auto/DBD/Oracle/Oracle.sl -L/opt/oracle/ora92/lib/ -lclntsh
-lcl -lrt -lpthread -ldld -lm -lqsmashr

/usr/bin/ld: /opt/oracle/ora92/rdbms/lib/defopt.o: Mismatched ABI.
64-bit PA object file found in 32-bit link 
*** Error exit code 1 

Stop. 


Output from perl -V: 

Summary of my perl5 (revision 5.0 version 8 subversion 0) configuration:

  Platform: 
osname=hpux, osvers=11.11, archname=PA-RISC2.0 
uname='hp-ux dbqcnv01 b.11.11 u 9000800 171434676 unlimited-user
license ' 
config_args='-Ubincompat5005' 
hint=recommended, useposix=true, d_sigaction=define 
usethreads=undef use5005threads=undef useithreads=undef
usemultiplicity=undef 
useperlio=define d_sfio=undef uselargefiles=define usesocks=undef 
use64bitint=undef use64bitall=undef uselongdouble=undef 
usemymalloc=n, bincompat5005=undef 
  Compiler: 
cc='cc', ccflags =' -Ae -D_HPUX_SOURCE -Wl,+vnocompatwarnings
-I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 ',

optimize='+O2 +Onolimit', 
cppflags='-Aa -D__STDC_EXT__ -D_HPUX_SOURCE -Ae -D_HPUX_SOURCE
-Wl,+vnocompatwarnings -I/usr/local/include' 
ccversion='A.11.01.20', gccversion='', gccosandvers='' 
intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=4321 
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16 
ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t',
lseeksize=8 
alignbytes=8, prototype=define 
  Linker and Libraries: 
ld='/usr/bin/ld', ldflags =' -L/usr/local/lib' 
libpth=/usr/local/lib /lib /usr/lib /usr/ccs/lib 
libs=-lnsl -lnm -lndbm -lmalloc -lcl -lpthread -ldld -lm -lc -lndir
-lcrypt -lsec 
perllibs=-lnsl -lnm -lmalloc -lcl -lpthread -ldld -lm -lc -lndir
-lcrypt -lsec 
libc=/lib/libc.sl, so=sl, useshrplib=false, libperl=libperl.a 
gnulibc_version='' 
  Dynamic Linking: 
dlsrc=dl_hpux.xs, dlext=sl, d_dlsymun=undef, ccdlflags='-Wl,-E
-Wl,-B,deferred ' 
cccdlflags='+Z', lddlflags='-b +vnocompatwarnings -L/usr/local/lib' 


Characteristics of this binary (from libperl): 
  Compile-time options: USE_LARGE_FILES 
  Built under hpux 
  Compiled at Sep  4 2002 20:07:18 
  @INC: 
/opt/perl5.8/lib/5.8.0/PA-RISC2.0 
/opt/perl5.8/lib/5.8.0 
/opt/perl5.8/lib/site_perl/5.8.0/PA-RISC2.0 
/opt/perl5.8/lib/site_perl/5.8.0 
/opt/perl5.8/lib/site_perl 
.