Home Page for the TeradataForum

Archives of the TeradataForum

Message Posted: Thu, 12 Jun 2003 @ 18:00:09 GMT

  <Prev Next>  
Next> Last>>  

Subj:   Perl and DBD::Teradata 1.13
From:   Adriano Ferreira

While writing a Perl script which accesses locally a Teradata database via DBI and DBD::Teradata 1.13, I encountered some unexpected errors related to a premature error while fetching data from a SELECT statement. The same SELECT statement works quite easily in WinDDI.

In the middle of a fetching loop, it stops complaining

ERROR 3119: Continue request submitted but no response to return.

This is the Perl script used.

Best regards,


#!/usr/local/bin/perl -w

use strict;
use warnings;

use DBI;

my $dbh = DBI->connect("dbi:Teradata:localhost", *****, *****,
      { AutoCommit => 0, RaiseError => 0, PrintError => 0 });

my $database = "mydatabase";

my $fetch_item_pedido = <prepare($fetch_item_pedido)
      or die "Erro ao preparar 'fetch_item_pedido': $DBI::errstr\n";

      or die "Erro executar 'fetch_item_pedido': $DBI::errstr\n";

$update = $dbh->prepare($update_item_pedido);

my $i; my $chunk = 1; # 100000;
my $qtd = 0;
while (my ($num_pedido, $num_item_pedido, $qtd_venda, $qtd_faturada)
= $stmt->fetchrow_array) {
      print "num: $num_pedido, item: $num_item_pedido, venda: $qtd_vend=
faturada: $qtd_faturada\n";

print "Erro ao buscar 'fetch_item_pedido': $DBI::errstr\n" if $DBI::err=
print "$i itens de pedido.\n";

Adriano Rodrigues Ferreira
Analista de Sistemas
Metodologia e Controle de Processos/Tecnologia da Informação
Peixoto Ind. Com. Trans. e Serv. Ltda

  <Prev Next>  
Next> Last>>  
  Top Home Privacy Feedback  
Copyright for the TeradataForum (TDATA-L), Manta BlueSky    
Copyright 2016 - All Rights Reserved    
Last Modified: 28 Jun 2020