Hi,

I was hoping someone could give me the right syntax for specifying
what type of data a column is with bind columns.  I get an error
from perl.exe when trying to update some stuff on my Access Database
and I think telling my script explicitly what kind of data it is (number or
string will fix it)

Code:  Where the ***** are is where I need the help.

Thanks!


$thismonth = $dbh->prepare( qq{Select CustomerID, CompanyName, ThisMonth
from Customers});

  print "Executing SQL Statement: " . $thismonth->{Statement} . "\n\n";

  print $thismonth->execute() . "\n\n" or die "Could not execute SQL
Statement:" .  $thismonth->errstr;

  #Now Need to access the actual values
  ***************  I need to have customerid be specified number,
companyname as string and currentmonth as number *************
  $thismonth->bind_columns(  \$customerid, \$companyname, \$currentmonth);

  while( $thismonth->fetch() ) {

  print "The Current month's bandwidth total for $companyname is:
$currentmonth\n\n";

  ##Now Need to UPdate Archives Table with $currentmonth placed into column
of lastmonth######
  $updatelast = $dbh->prepare (qq {update Archives set $abbrevdate =
$currentmonth where Customerid = $customerid});

  print "Executing SQL Statement: " .  $updatelast->{Statement} . "\n\n";

  $updatelast->execute();

  #End Of While Loop
 }




Reply via email to