sub valida_user
{
use DBI;
use DBD::Oracle qw(ORA_VARCHAR2);
my($db, $sth);
$ENV{ORACLE_HOME} = "/u1/oracle/product/8.0.5";
$db = DBI->connect("dbi:Oracle:host=my_ip;sid=fty", "hmo", "hmo")
or die "Unable to connect: $DBI::errstr";
$db->{RaiseError} = 1;
my $user=$_[0];
my $password=$_[1];
my $query = "select count(*) from sm_usuarios_dat where IDEN_USUA = :user
and PASS_USUA= :password";
my $conteo=0;
$sth = $db->prepare($query);
$sth->bind_param(":user",$user,20);
$sth->bind_param(":password",$password,20);
$sth->execute() or return undef;
$conteo= $sth->fetchrow_array;
$db->disconnect;
return $conteo;
}
****************************************************************************
***********************
this is showed:
DBD::Oracle::st execute failed: ORA-00904: invalid column name (DBD ERROR:
OCISt
mtExecute) at maneja_admin.plx line 591.
[mmacias@intranet hernan]$ perl maneja_admin.plx
Content-type: text/html
DBI bind_param: invalid number of parameters: handle + 4
Usage: $h->bind_param($parameter, $var [, \%attr]) at maneja_admin.plx line
591.
[mmacias@intranet hernan]$ perl maneja_admin.plx
Content-type: text/html
SQL type 1075461088 for '' is not fully supported, bound as SQL_VARCHAR
instead
at maneja_admin.plx line 591.
SQL type 1075461088 for '|H;#
' is not fully supported, bound as SQL_VARCHAR
inste
ad at maneja_admin.plx line 592.
Saludos,
Hern�n Moreno