Subject | Re: quotes in object names dialect 3 |
---|---|
Author | Roman Rokytskyy |
Post date | 2003-12-21T18:00:29Z |
Hi,
it as it is. Try your query in some tool first (IBExpert for example,
or even isql), there must be some problem elsewhere.
quotes there.
Personally I use quoted identifiers only when I have to (e.g. some
word is reserved in Firebird, and I must use it as table/column name).
you can create views that will convert you names to uppercase. If you
have table:
CREATE TABLE "atable" ("id" INTEGER);
you can create a view for it:
CREATE VIEW atable(id) AS SELECT "id" FROM "atable"
This view will be updatable (see InterBase documentation for more
info) and you will be able to SELECT id FROM atable, as well as INSERT
INTO atable (id) VALUES (1), etc.
Also if you believe there is a problem with the driver, post here an
example/test case that reproduces the issue, I will check it.
Best regards,
Roman Rokytskyy
> as far as i understood developers thought what to do with getXXX()Driver does not parse query before sending it to the server, it sends
> methods, but i have problems before getting the field but with
> passing a query to the server like this:
>
> String q = "select \"met\".id, iddt, changetime, code from \"met\" " +
> "inner join \"code\" on \"met\".id=\"code\".id where code = '" +
> cdmet + "'";
> Statement s = c.createStatement();
> ResultSet r = s.executeQuery(q);
>
> it says on executeQuery
>
> Column unknown
> met.ID
it as it is. Try your query in some tool first (IBExpert for example,
or even isql), there must be some problem elsewhere.
> before this i've escaped double quotes around all column names likePlease post fully quoted query here, I suspect that you missed some
> this
>
> String q = "select \"met\".\"id\", \"iddt\"......... etc
quotes there.
> the result was the same!It will complicate your life, since each field has to be quoted.
>
> (when used without any doublequotes, it said "Table unknown MET".)
>
> the database has _all_ identifiers, table and fieldname, in
> lowercase. i think i'll regret it :(
Personally I use quoted identifiers only when I have to (e.g. some
word is reserved in Firebird, and I must use it as table/column name).
> still hope there is some modifier property, or i should rewrite allThere's no such property. If rewriting the database becomes a must,
> the database!...
you can create views that will convert you names to uppercase. If you
have table:
CREATE TABLE "atable" ("id" INTEGER);
you can create a view for it:
CREATE VIEW atable(id) AS SELECT "id" FROM "atable"
This view will be updatable (see InterBase documentation for more
info) and you will be able to SELECT id FROM atable, as well as INSERT
INTO atable (id) VALUES (1), etc.
Also if you believe there is a problem with the driver, post here an
example/test case that reproduces the issue, I will check it.
Best regards,
Roman Rokytskyy