Conexión con DB2
![Nota Nota](https://perlenespanol.com/foro/styles/prosilver/imageset/icon_post_target.gif)
Buenas tardes. Una duda... trato de conectarme a una base de datos
DB2 versión 8.3
pero no me deja conectarme... me manda el siguiente error
No sé si me falta bajar alguna librería aparte, porque esa me está tronando, y no me deja conectarme. Mi archivo es el siguiente:
DB2 versión 8.3
pero no me deja conectarme... me manda el siguiente error
- Código: Seleccionar todo
DBI connect('dsnContent','root',...) failed: [unixODBC][IBM]
[Controlador ODBC de iSeries Access]AnomalÃa de enlace de comunicaciones.
comm rc=10061 - CWBCO1049 - No se ha iniciado la aplicación del servidor iSeries
(SQL-08004)
No sé si me falta bajar alguna librería aparte, porque esa me está tronando, y no me deja conectarme. Mi archivo es el siguiente:
Using perl Syntax Highlighting
#!/usr/bin/perl
use DBI;
$dbh = DBI->connect('dbi:ODBC:dsnContent','usuario','contrasena')or MiError("DBI::errstr");
$sth = $dbh->prepare("select ITEMID, DUREQUISITO from ICMADMIN.DUGRUPODGU001 where dufolio='7-2267'") or MiError("DBI::errst$)
$sth->execute or MiError("DBI::errstr");
while ($rs = $sth->fetchrow_hashref) {
foreach $campo (keys %$rs) {
print "$campo : $$rs{$campo}\n";
}
print "-----------------------------------------------\n";
$x = <STDIN>;
}
sub MiError {
my $msg = shift;
print "error = $msg";
exit 0;
}
use DBI;
$dbh = DBI->connect('dbi:ODBC:dsnContent','usuario','contrasena')or MiError("DBI::errstr");
$sth = $dbh->prepare("select ITEMID, DUREQUISITO from ICMADMIN.DUGRUPODGU001 where dufolio='7-2267'") or MiError("DBI::errst$)
$sth->execute or MiError("DBI::errstr");
while ($rs = $sth->fetchrow_hashref) {
foreach $campo (keys %$rs) {
print "$campo : $$rs{$campo}\n";
}
print "-----------------------------------------------\n";
$x = <STDIN>;
}
sub MiError {
my $msg = shift;
print "error = $msg";
exit 0;
}
Coloreado en 0.002 segundos, usando GeSHi 1.0.8.4