Naveena has asked for the wisdom of the Perl Monks concerning the following question:
use DBI; my $dbh; use DBI qw(:sql_types); $dbh = DBI->connec('Dbname','usrname','passwd','Oracle', \%attr); my $sth_LOG = $dbh->prepare( qq{select num_org_mfg,cd_typ_evnt_dntm,num_rsn_dntm from mfg_evnt.dntm_rsn_ulog where num_org_mfg = 7664 and cd_typ_evnt_dntm ='DNTM' and num_rsn_dntm = 2}); my $sth_DNTM = $dbh->prepare(qq{select num_org_mfg,nam_rsn_dntm from mfg_evnt.dntm_rsn and cd_typ_evnt_dntm= ? and num_org_mfg = ? }); if($DBI::errstr) { print "error in preparation ........\n"; } $sth_LOG->execute(); if ($DBI::errstr) { print "error in sth_log execute\n"; } ($num_org, $cd_typ, $num_rsn) = $sth_LOG->fetchrow_array(); # binding parameters to sth_DNTM statememt $sth_DNTM->bind_param(1,$cd_typ); $sth_DNTM->bind_param(2,$num_org); $sth_DNTM->execute(); @row = $sth->fetchrow_array(); print "@row\n"; $sth_LOG->finish; $sth_DNTM->finish; $dbh->disconnect;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: DBI:Problem in binding VARCHAR values to statement
by chromatic (Archbishop) on May 07, 2001 at 02:40 UTC | |
by chipmunk (Parson) on May 07, 2001 at 06:52 UTC | |
|
Re: DBI:Problem in binding VARCHAR values to statement
by dws (Chancellor) on May 07, 2001 at 01:27 UTC | |
|
Re: DBI:Problem in binding VARCHAR values to statement
by runrig (Abbot) on May 07, 2001 at 05:35 UTC |