Subject | Re: [Firebird-Java] Firebird table field problem |
---|---|
Author | Helen Borrie |
Post date | 2002-04-17T02:37:18Z |
PLEASE DO NOT DO ALL THIS REQUOTING. It is a capital offence in lists and
newsgroups.
At 06:38 PM 16-04-02 -0700, you wrote:
double-quoted delimiters and (2) always refer to it in SQL using the
d/quotes. Double-quoting identifiers also makes them case-sensitive.
To get into the position where your passwordcol column has the right
identifier for the app, do
alter table mytable alter passwordcol to "PASSWORD";
Provided the string you change it to has the same case as the references in
your java classes, you won't need to add the quotes to the occurrences in
the classes. If you have been in the habit of not using one case or the
other, then you'll have some grepping to do.
This won't help if your database is Dialect 1 though - quoted identifiers
aren't supported there. You'll have to stick with passwordcol and change
your classes.
Helen
All for Open and Open for All
Firebird Open SQL Database · http://firebirdsql.org ·
http://users.tpg.com.au/helebor/
_______________________________________________________
newsgroups.
At 06:38 PM 16-04-02 -0700, you wrote:
>I have a field name 'password' in a table X. During conversion from AccessYou can use "password" as an identifier provided you (a) define it with
>table,
>the field name was automatically converted to 'passwordcol'. Looks like
>Firebird
>doesn't allow 'password' as field name. I have an existing Java
>application with
>more than a thousand classes, with complex relationships, and database
>tables mapped
>as java objects. This makes it very difficult to change the field name in
>Java app
>itself. What could be the best solution in such a situation? Any thoughts?
double-quoted delimiters and (2) always refer to it in SQL using the
d/quotes. Double-quoting identifiers also makes them case-sensitive.
To get into the position where your passwordcol column has the right
identifier for the app, do
alter table mytable alter passwordcol to "PASSWORD";
Provided the string you change it to has the same case as the references in
your java classes, you won't need to add the quotes to the occurrences in
the classes. If you have been in the habit of not using one case or the
other, then you'll have some grepping to do.
This won't help if your database is Dialect 1 though - quoted identifiers
aren't supported there. You'll have to stick with passwordcol and change
your classes.
Helen
All for Open and Open for All
Firebird Open SQL Database · http://firebirdsql.org ·
http://users.tpg.com.au/helebor/
_______________________________________________________