Subject | Re: [Firebird-Java] decision help needed |
---|---|
Author | Richard Bair |
Post date | 2002-10-16T20:32:15Z |
If I'm way off disregard!
It sounds like the String.equalsIgnoreCase() should be employed? You are
just talking about comparing the column names, right?
Internet access plans that fit your lifestyle -- join MSN.
http://resourcecenter.msn.com/access/plans/default.asp
It sounds like the String.equalsIgnoreCase() should be employed? You are
just talking about comparing the column names, right?
>From: "Roman Rokytskyy" <rrokytskyy@...>_________________________________________________________________
>Reply-To: Firebird-Java@yahoogroups.com
>To: Firebird-Java@yahoogroups.com
>Subject: [Firebird-Java] decision help needed
>Date: Wed, 16 Oct 2002 19:24:27 -0000
>
>Dear All,
>
>We have a bug in our driver in converting column name into column
>position. This bug is connected to the SQL dialect 3. In most cases
>Java developers use unquoted identifiers in our queries. In SQL
>dialect 1 (and this is preserved in SQL dialect 3), they are case
>insensitive. However, on the server side they are converted to the
>upper case. So, actually 'col1' is a 'COL1' (I use single quotes here
>to mark a string to avoid using double quotes). And 'COL1' is the name
>of the column we get from the server in an XSQLVAR structure. However,
>in SQL dialect 3 one can create column "col1" and server will return
>it as 'col1'.
>
>At present time in the driver code we convert column name in
>getXXX(String) method to the upper case to make perform search in the
>XSQLVAR structure. It is clear that this will not work for "col1".
>
>My suggestion is the following:
>
>If a column name starts with double quote (for example,
>getString("\"col1\"") != getString("col1")), we do not convert it into
>upper case, otherwise we convert column name into upper case (for
>example, getString("col1") == getString("COL1")).
>
>What do you think? Any other ideas?
>
>Thanks in advance for your comments!
>
>Roman Rokytskyy
>
Internet access plans that fit your lifestyle -- join MSN.
http://resourcecenter.msn.com/access/plans/default.asp