In many databases "TYPE" is a reserved word, although some drivers will
allow it and others will not. You might try a test with a slightly different
column name.

> ----------
> From:         Christian Haul[SMTP:[EMAIL PROTECTED]]
> Reply To:     [EMAIL PROTECTED]
> Sent:         Thursday, March 21, 2002 11:35 AM
> To:   [EMAIL PROTECTED]
> Subject:      Re: ESQL - mixed case in column names spits "attribute
> <lowercase-col umn-name> not found" on SELECT
> 
> On 21.Mar.2002 -- 10:45 AM, von Schwerdtner, Thomas (GXS, FPI) wrote:
> >     <esql:query>SELECT * FROM supporttype</esql:query>
> > and
> >     <esql:get-string column="Type"/>
> > 
> > which works just fine (resulting page displays the contents of the
> 'Type'
> > column).
> > 
> > If I change the query to:
> > 
> > SELECT Type FROM supportype
> > 
> > (changing the '*' to 'Type' I get this error:
> > 
> > org.apache.cocoon.ProcessingException: Exception in
> > ServerPagesGenerator.generate(): java.lang.RuntimeException: Error
> executing
> > statement: SELECT Type FROM supporttype: java.sql.SQLException: ERROR:
> > Attribute 'type' not found
> 
> SQL converts everything to UPPERCASE. So it should not matter if you
> call it "type" "Type" "TYPE" or "TyPe". Everything else is a bug in
> your JDBC driver or DBMS. If case _does_ matter, enclosing names in
> "'" or '"' should prevent uppercasing.
> 
> From this follows, that it's OK for the driver to report the column
> name all lowercased, because according to SQL it's equivalent.
> 
> Sounds like a problem with access rights or broken JDBC driver to me.
> 
> > Developers: Is this a bug in CVS?
> 
> I doubt it because esql just takes the name / query and passes it to
> the driver. It doesn't do any case conversions or whatever. It does
> not appear so, but esql is really just a thin layer on top of jdbc.
> 
> Try to achieve the same with a stand-alone java program. It should
> show the same error messages. Usually, some easy to modify samples are
> enclosed with the driver.
> 
>       Chris.
> 
> -- 
> C h r i s t i a n       H a u l
> [EMAIL PROTECTED]
>     fingerprint: 99B0 1D9D 7919 644A 4837  7D73 FEF9 6856 335A 9E08
> 
> ---------------------------------------------------------------------
> Please check that your question has not already been answered in the
> FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
> 
> To unsubscribe, e-mail: <[EMAIL PROTECTED]>
> For additional commands, e-mail: <[EMAIL PROTECTED]>
> 

---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>

Reply via email to