Re: error in inserting to mysql

2006-05-19 Thread Mario R. Sanchez, Ph.D.
can it be that you have 25 "?" but have 26 variables??? > 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; > use DBI; > my ( $

RE: error in inserting to mysql

2006-05-19 Thread Chris Newman
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

Re: error in inserting to mysql

2006-05-19 Thread Axel Mock
Hi Eko, I did not test the script, but what looks strange to me is: my ( $brg ) = @$row; I doubt that this assignment really fills the variable list declared at the beginning of the script and if it does it is at least highly "illegible". I would suggest to use fetchrow_hashref, which returns

RE: error in inserting to mysql

2006-05-19 Thread Brian Raven
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Eko Budiharto Sent: 19 May 2006 04:43 To: activeperl@listserv.ActiveState.com Subject: error in inserting to mysql > hi, > I write a script that does extract data from a dbf file and insert the value into mysql. After I ran it, it > d