Subject | Re: AW: [firebird-support] uppercase field name |
---|---|
Author | Kjell Rilbe |
Post date | 2011-05-10T09:49:55Z |
Den 2011-05-10 11:37 skrev Olaf Kluge såhär:
quoting. Try isql, FlameRobin or some other tool that's more up to date.
Then drop the table with SQL such as this:
drop table "yourlowercasetablename";
It should work. In FlameRobin you could even click on it in the explorer
tree and request it to be deleted.
tools may not support it correctly, but that would be a problem with the
tool, not Firebird.
If an identifier is unquoted when it is created, FB will store it in
uppercase. If it is quoted when it is created, FB will store it with the
case as is - no conversion.
When referencing an identifier, the same rules apply: not quoted = FB
will uppercase it/quoted = FB will use it as is.
This means that if an identifier is created with quotes and lowercase,
you cannot access it without quotes, because FB will uppercase the
identifier before trying to find it. This will fail, of course, since it
was created in lowercase. So, when you've created and identifier with
quotes in lowercase, you must always reference it with quotes and lowercase.
This is really very intuitive once you think about it. As a rule of
thumb: if you create it qith quotes, always ref with quotes, and if you
create it qithout quotes, always ref it qithout quotes.
The only "gotcha" is when you create an identifier WITH quotes but in
UPPERCASE. In that case you can ref it without quotes and in any case.
(Assuming it contains plain ASCII chars only).
Kjell
--
--------------------------------------
Kjell Rilbe
DataDIA AB
E-post: kjell@...
Telefon: 08-761 06 55
Mobil: 0733-44 24 64
> The problem arises with the old ems/ib manager from the year 2004. NeitherFor such an old tool I am not surprised if it doesn't fully support
> with or without quotes the old manager knows no fields and table names with
> small letters. The manager recognizes automatically a table name and the
> quotes not needed. The same with UDFs. How I wrote, with another manager
> (ibexpert) there are no problems at all.
quoting. Try isql, FlameRobin or some other tool that's more up to date.
Then drop the table with SQL such as this:
drop table "yourlowercasetablename";
It should work. In FlameRobin you could even click on it in the explorer
tree and request it to be deleted.
> Second, the co-worker has accessed the table named with lower cases. After IIt is not a "problem" of Firebird. This is an ordinary SQL feature. Some
> have deletet the record in mon$attachments, I was able to delete the record.
>
> I'm using the old sql manager since 8 years. Therefore I thought it is an
> problem - it is indeed, but one of firebird. If desired I can make a
> screenshot. EMS/IB knows no tables and fields that are in lower case.
tools may not support it correctly, but that would be a problem with the
tool, not Firebird.
If an identifier is unquoted when it is created, FB will store it in
uppercase. If it is quoted when it is created, FB will store it with the
case as is - no conversion.
When referencing an identifier, the same rules apply: not quoted = FB
will uppercase it/quoted = FB will use it as is.
This means that if an identifier is created with quotes and lowercase,
you cannot access it without quotes, because FB will uppercase the
identifier before trying to find it. This will fail, of course, since it
was created in lowercase. So, when you've created and identifier with
quotes in lowercase, you must always reference it with quotes and lowercase.
This is really very intuitive once you think about it. As a rule of
thumb: if you create it qith quotes, always ref with quotes, and if you
create it qithout quotes, always ref it qithout quotes.
The only "gotcha" is when you create an identifier WITH quotes but in
UPPERCASE. In that case you can ref it without quotes and in any case.
(Assuming it contains plain ASCII chars only).
Kjell
--
--------------------------------------
Kjell Rilbe
DataDIA AB
E-post: kjell@...
Telefon: 08-761 06 55
Mobil: 0733-44 24 64