Re: Error accessing columns

[prev] [thread] [next] [Date index for 2004/04/28]

From: Michele Valzelli
Subject: Re: Error accessing columns
Date: 14:43 on 28 Apr 2004
On Wed, 28 Apr 2004, Tony Bowden wrote:

> On Wed, Apr 28, 2004 at 02:57:23PM +0200, Michele Valzelli wrote:
> > Then in my web application I perform a search on this table and print out 
> > some info I retireved. If I print only the primary keys values everything 
> > works fine. When I try to print out the values from any column of the 
> > group 'All' I get this error:
> 
> Can you supply a small test script that shows the error?
> 
> Thanks,
> 
> Tony
> 

I tried to make it as simpler as possible to help you reproduce the 
problem. I also removed the call to set_up_table.

Here is the module where i define the class:

____________________________________________________________________________

package Messagenet::DBI::Fattura;
use base 'Messagenet::DBI';
#__PACKAGE__->set_up_table('fatture');
__PACKAGE__->table('fatture');
__PACKAGE__->columns(Primary => qw/anno id/);
__PACKAGE__->columns(Others => qw/id_fatturazione importo scadenza pagata/);

1;

____________________________________________________________________________

Messagenet::DBI is my base class that inherits from Class::DBI::Oracle

Here is table SQL definition:

____________________________________________________________________________

CREATE TABLE Fatture (
  ID		    NUMBER,
  ANNO		    NUMBER,
  ID_FATTURAZIONE   NUMBER NOT NULL,
  IMPORTO	    NUMBER	    NOT NULL,
  SCADENZA	    DATE	    NOT NULL,
  PAGATA	    NUMBER(1),
  PRIMARY KEY (ID,ANNO)
)

_____________________________________________________________________________

Here is a simple script:

_____________________________________________________________________________

#!/usr/bin/perl
use Messagenet::DBI::Fattura;
my $it =  Messagenet::DBI::Fattura->search(anno => 2004);

while (my $fattura = $it->next) {
    print $fattura->id;
    print $fattura->pagata;
    print "\n";
}

______________________________________________________________________________

Hope it's all clear.

Thanks

        -- 
        Michele Valzelli - Messagenet srl
Messaggistica e Telecomunicazioni
Tel: +39 02 48102000
Fax: +39 02 700443128

Error accessing columns
Michele Valzelli 12:57 on 28 Apr 2004

Re: Error accessing columns
Tony Bowden 13:20 on 28 Apr 2004

Re: Error accessing columns
Michele Valzelli 14:43 on 28 Apr 2004

Re: Error accessing columns
Tony Bowden 15:18 on 28 Apr 2004

Re: Error accessing columns
Michele Valzelli 16:05 on 28 Apr 2004

Generated at 11:34 on 01 Dec 2004 by mariachi v0.52