Hello, can anyone tell me why i am unable to update the text with this
function. I get


select DESCRIP from WEB_ISSUES where ISSUE_ID = '1217617351-999885'

Can't locate object method "ct_finish_send" via package "DBI::st" at ./
web_issues.cgi line 102.



The code

issuetext('DESCRIP','1217617351-999885','big problem');


sub issuetext{
my $infield=$_[0];
my $inid=$_[1];
my $invalue=$_[2];

if (length($invalue) > 1){
my $data1='dbi:Sybase:PROD';
my $db='testdatabase';
my $uname = 'sa';
my $pword = 'password';
my $dbh=DBI->connect($data1, $uname, $pword);
my $rv = $dbh->do("use $db");

  print "select $infield from WEB_ISSUES where ISSUE_ID = '$inid'\n
\n";
  $sth = $dbh->prepare("select $infield from WEB_ISSUES where ISSUE_ID
= '$inid'");
  $sth->execute;
  while($sth->fetch) {    # don't care about the data!
      $sth->syb_ct_data_info('CS_GET', 1);
  }

  # OK - we have the CS_IODESC values, so do the update:
  $sth->syb_ct_prepare_send();
  # Set the size of the new data item (that we are inserting), and
make
  # the operation unlogged
  $sth->syb_ct_data_info('CS_SET', 1, {total_txtlen =>
length($invalue), log_on_update => 0});
  # now transfer the data (in a single chunk, this time)
  $sth->syb_ct_send_data($invalue, length($invalue));
  # commit the operation
  $sth->ct_finish_send();
$dbh->disconnect();
}
}

Reply via email to