|
Try checking $DBI::err after each database
statement. If $DBI::err is set, print out $DBI::errstr. This will help you find
SQL commands that are failing. For example… $dbh->do(“some SQL command”) if ($DBI::err) { die “$DBI::errstr\n”; } You might also try an insert manually from
the mysql> client tool. This is often helpful in finding a mismatch between
the column names specified in your script and the actual column names in you
database. cn From:
[EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
On Behalf Of Eko Budiharto hi, I write a script that does extract data from a dbf file
and insert the value into mysql. After I ran it, it does not insert the data
into mysql. the script: #!/usr/bin/perl -w use strict; my ( $brg, $nama, $jenis, $stn, $hbeli, $maxi, $mini, $stn2, $isi,
$hpp, $hbesar, $hkecil, $mvc, $lks, $sup, $merek, $part, $type, $nama2, $klink,
$hp_std, $qprod, $qsales, $tgl_klr, $warna ) = ""; my $dbh = DBI->connect("DBI:XBase:h:\/fuboru\/dataIMS" ) or
die $DBI::errstr; my $sth = $dbh->prepare("select brg from hipdf02") or die
$dbh->errstr(); while (my $row = $sth->fetchrow_arrayref() ) {
} $dbh->disconnect(); do you mind if someone can tell me what is wrong with the code? I am looking forward to a favorable reply from you. Thank you.
Feel free to call! Free PC-to-PC calls. Low rates on PC-to-Phone. Get
Yahoo! Messenger with Voice |
_______________________________________________ ActivePerl mailing list [email protected] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
