I think you need to take a look at perdoc dbi. try breaking the script down
into sections. first try just connecting to your datasource and see if that
produces any errors, then proceed with the next section.
also take a look at the docs for the execute(). you don't need to assign the
execute() to a variable. just execute it then use one of the methods for
outputting the data 

> -----Original Message-----
> From: Omar Shariff [mailto:[EMAIL PROTECTED]]
> Sent: Monday, July 29, 2002 2:18 PM
> To: [EMAIL PROTECTED]
> Subject: WINNT
> 
> 
> Hi, i'm having problems with WIN NT, oracle and DBI, i
> write a script
> 
> use DBI;
> 
> $cta = 85498932;
> my $dbh = DBI->connect("dbi:Oracle:para_lelos",
> "gonzalo", "pepepepe") 
>               or die "No se puede establece la coneccion
> $data_source: $DBI::errstr";
> 
> my $sth = $dbh->prepare(q{SELECT * FROM SPO_DETALLE
> WHERE NRO_CUENTA = ?}) 
>               or die "No se puede preparar la sentencia:
> $DBI::errstr";
> 
> my $rc = $sth->execute($cta) or die "No se puede
> ejecutar: $DBI::errstr";
> 
> print "Query will return $sth->{NUM_OF_FIELDS}
> fields.\n\n";
> print "Field names: @{ $sth->{NAME} }\n";
> print "Filas: $sth->rows \n";
> 
> while (my $registro = $sth->fetchrow_hashref) {
>       print $registro->{LINEA};
> }
> 
> # check for problems which may have terminated the
> fetch early
> die $sth->errstr if $sth->err;
> $dbh->disconnect;
> 
> when i run it first give me a OCI.DLL error i install
> DBD-ORACLE and now give me 
> Content-type: text/html; charset= ISO-8859-1
> 
> <?xml version="1.0" encoding="utf-8"?>
> etc, etc, and do nothing!!!
> help!!!!
> thanks
> 
> Ahora podés usar Yahoo! Messenger desde tu celular. Aprendé 
> cómo hacerlo en Yahoo! Móvil: http://ar.mobile.yahoo.com/sms.html
> 
> -- 
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to