Error accessing columns

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

From: Michele Valzelli
Subject: Error accessing columns
Date: 12:57 on 28 Apr 2004
Hi All!

I'm developing my first application using Class::DBI, and I think it's 
very useful for my needs.
I have though found a problem taht I can't figura out how to sovle.

This is a situation:

I've got a table named 'Fatture'. It's primary key is composed by two 
columns: 'id' and 'anno' (that's year in italian).

I use the Class::DBI::Oracle->set_up_table function to define the columns, 
and that seems to get everything right.

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:

DBD::Oracle::st execute failed: called with 1 bind variables when 2 are needed [for Statement 
"SELECT id_fatturazione, pagata, importo, scadenza
FROM   fatture
WHERE  id=? AND anno=?
" with ParamValues: :p1=undef, :p2=undef] at /usr/lib/perl5/site_perl/5.8.3/DBIx/ContextualFetch.pm line 51.

This is what I get setting DBI trace level to 1:

1T  <- prepare('SELECT id_fatturazione, pagata, importo, scadenza
FROM   fatture
WHERE  id=? AND anno=?
' undef)= DBIx::ContextualFetch::st=HASH(0x8629724) at DBI.pm line 1470
       error: -1 'called with 1 bind variables when 2 are needed'
1   <- FETCH('ParamValues')= HASH(0x8629814)2keys at ContextualFetch.pm line 51

I'm using Class-DBI-0.95  and Class-DBI-Oracle-0.51.

Thanks in advance

Regards

        -- 
        Michele Valzelli - Messagenet srl
Messaggistica e Telecomunicazioni

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