David, The actual code is uncommented:
my $sql = "insert into bar( group_name, me, daily, item, unit, qty, amount, tax, total ) values( ?, ?, ?, ?, ?, ?, ?, ?, ? ) "; Sorry, Jerry -----Original Message----- From: Logan, David (SST - Adelaide) [mailto:[EMAIL PROTECTED] Sent: Sunday, February 27, 2005 5:09 AM To: Gerald Preston; mysql users Subject: RE: insert data Hi Gerald, If this is copied out of your perl code then you haven't put anything into the $sql variable. Try uncommenting the 2 lines above. Regards David Logan Database Administrator HP Managed Services 148 Frome Street, Adelaide 5000 Australia +61 8 8408 4273 - Work +61 417 268 665 - Mobile +61 8 8408 4259 - Fax -----Original Message----- From: Gerald Preston [mailto:[EMAIL PROTECTED] Sent: Sunday, 27 February 2005 9:33 PM To: mysql users Subject: insert data Hi! I am trying to insert data for the first time using MySQL. In Oracle I used the following: # my $sql = "insert into bar( group_name, me, daily, item, unit, qty, amount, tax, total ) # values( ?, ?, ?, ?, ?, ?, ?, ?, ? ) "; my $sth = $dbh->prepare( $sql ); die $dbh->errstr if $dbh->err; $sth->execute( $group_name, $me, $daily, $item, $unit, $qty, $amount, $tax, $total ) || die "Cannot execute FIRST Statement!!\n$DBI::errstr"; I keep getting "Can't call method "prepare" on an un undefined value. All the name listed are correct by looking at MySQLAdmin1.3\4. Any ideas? Thanks, Jerry -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]