suhailck has asked for the wisdom of the Perl Monks concerning the following question:
#!/usr/bin/perl use DBI; use DBD::Oracle; my $dbh=DBI->connect("dbi:Oracle:XE","suhail","suhail",<br>{AutoCommit +=>0,RaiseError=>1})||die "Can't connect $DBI::errstr"; $sql='insert into u_configname values (?,?,?,?,?,?,?,?,?,?,?)'; open(MY,"Desktop/b1.txt"); while(<MY>) { my($a,$b,$c,$d,$e,$f,$g,$h,$i,$j,$k)=split /,/; eval { my $sth=$dbh->prepare($sql); $sth->execute($a,$b,$c,$d,$e,$f,$g,$h,$i,$j,$k)||die "$!"; $dbh->commit; }; if ($@) { $dbh->rollback; } } close(MY); END { $dbh->disconnect if defined $dbh; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: DBD ERROR: error possibly near <*> indicator at char
by afoken (Chancellor) on Mar 25, 2009 at 08:25 UTC | |
by tweetiepooh (Hermit) on Mar 25, 2009 at 10:27 UTC | |
by suhailck (Friar) on Mar 25, 2009 at 08:52 UTC | |
by Anonymous Monk on Oct 14, 2017 at 16:11 UTC | |
by roboticus (Chancellor) on Oct 14, 2017 at 16:32 UTC | |
|
Re: DBD ERROR: error possibly near <*> indicator at char
by frieduck (Hermit) on Mar 25, 2009 at 16:20 UTC |