You are viewing a plain text version of this content. The canonical link for it is here.
Posted to torque-user@db.apache.org by Thoralf Rickert <th...@cadooz.de> on 2006/07/13 10:24:13 UTC

Sybase case insensitive column names

Hi!

I've created a schema.xml for an existing Sybase database and I was able
to generate the corresponding java classes. If I try to make a query
with them I run into a problem. The database uses case sensitive column
names but torque generates uppercase column names. For example the
following query throws an exception, because the column "STATE" cannot
be found (in the database it's called "state").

  SELECT states.STATE FROM states ORDER BY states.STATE ASC

Is there a way to handle this? Is there a sybase specific connection
setting or something like that?

Thanks
Thoralf


---------------------------------------------------------------------
To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org


Re: Sybase case insensitive column names

Posted by Thomas Fischer <tf...@apache.org>.
Hi,

This is strange; the jdbc task should preserve the case of the table and 
column names (I checked that using mysql; as I do not have a sybase 
database). The jdbc task uses the DatabaseMetaData from the jdbc driver to 
get the database; if the database is case sensitive and the 
DatabaseMetaData does not preserve case it is a bug of the jdbc driver.

     Thomas

On Thu, 13 Jul 2006, Thoralf Rickert wrote:

> Hi!
>
> I've created a schema.xml for an existing Sybase database and I was able
> to generate the corresponding java classes. If I try to make a query
> with them I run into a problem. The database uses case sensitive column
> names but torque generates uppercase column names. For example the
> following query throws an exception, because the column "STATE" cannot
> be found (in the database it's called "state").
>
>  SELECT states.STATE FROM states ORDER BY states.STATE ASC
>
> Is there a way to handle this? Is there a sybase specific connection
> setting or something like that?
>
> Thanks
> Thoralf
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
> For additional commands, e-mail: torque-user-help@db.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org