in reply to Re: db prepare failed:invalid character error : Perl DBI - Help plz
in thread db prepare failed:invalid character error : Perl DBI - Help plz
Thanks SriHi Corion, Thanks for your response. Actually I am using place holders in my code.. Below is my code.. But still I am getting the error....Below is my code #!/usr/bin/perl use DBI; $ACCDBHOST = "host"; $ACCDBDB = "db"; $ACCDBUSER = "user"; $ACCDBPWD = "pwd"; $db = DBI->connect("DBI:Oracle:host=$ACCDBHOST;sid=$ACCDBDB",$ACCDBUSE +R,$ACCDBPWD); unless($db) { print "(ERROR) Failed to connect to $ACCDBHOST."; exit(1); } $scode = 198000031; my $sth1 = $db->prepare("SELECT 一時上司社員番号 FROM WF_WORKFLOW WHER +E 本人社員番号 = ?"); $sth1->bind_param(1,$scode1); $sth1->execute(); my $row1; while ( $row1 = $sth1->fetchrow_array( ) ) { print $row1; } $sth1->finish(); $db->disconnect();
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: db prepare failed:invalid character error : Perl DBI - Help plz
by graff (Chancellor) on Oct 15, 2007 at 08:28 UTC |