Обсуждение: Problem with java.sql.DatabaseMetaData

Поиск
Список
Период
Сортировка

Problem with java.sql.DatabaseMetaData

От
"Mitterwald, Holger"
Дата:
Hello, I still have some problems with
the methods
getIndexInfo()
and
getTables()

In my opinion it shouldn't matter if I define the tablenames
in lowercase or in mixed/uppercase like in "normal" sql-statements.
There the both statements are equal:
select * from customer....
and
select * from Customer...

But in the jdbc driver you have to put all the table names in both methods
as lowercase - otherwise no Tables are found.

So shouldn't the JDBC-driver automatically convert the tablenames to lowercase?????

Best regards,
   Holger

Re: Problem with java.sql.DatabaseMetaData

От
Dave Cramer
Дата:
Holger,

This has come up before, and I think the resolution was that you are
right they should be converted to lower case. The challenge comes when
you do create a table with upper case using single quotes, how do you
find it?

Dave

On Thu, 2002-06-06 at 10:10, Mitterwald, Holger wrote:
> Hello, I still have some problems with
> the methods
> getIndexInfo()
> and
> getTables()
>
> In my opinion it shouldn't matter if I define the tablenames
> in lowercase or in mixed/uppercase like in "normal" sql-statements.
> There the both statements are equal:
> select * from customer....
> and
> select * from Customer...
>
> But in the jdbc driver you have to put all the table names in both methods
> as lowercase - otherwise no Tables are found.
>
> So shouldn't the JDBC-driver automatically convert the tablenames to lowercase?????
>
> Best regards,
>    Holger
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster
>
>




Re: Problem with java.sql.DatabaseMetaData

От
Barry Lind
Дата:
Holger,

Since it is valid sql to have "Customer", "CUSTOMER", "CuStOmEr" and
CUSTOMER as four different tables that all exist at the same time, how
would you propose that you access the index info for one of the quoted
mixed case named tables?  (SQL is case insensitive unless the identifier
is quoted, in which case it is case sensitive).
 From what I can tell the jdbc spec is entirely quiet on this issue.
Does anyone know what other database jdbc drivers do?  Anyone have
access to Oracle or some other database that could create two tables
(one with a mixed case name using quotes and the other without) and see
how their jdbc drivers handle this, if at all.

thanks,
--Barry


Mitterwald, Holger wrote:
> Hello, I still have some problems with
> the methods
> getIndexInfo()
> and
> getTables()
>
> In my opinion it shouldn't matter if I define the tablenames
> in lowercase or in mixed/uppercase like in "normal" sql-statements.
> There the both statements are equal:
> select * from customer....
> and
> select * from Customer...
>
> But in the jdbc driver you have to put all the table names in both methods
> as lowercase - otherwise no Tables are found.
>
> So shouldn't the JDBC-driver automatically convert the tablenames to lowercase?????
>
> Best regards,
>    Holger
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster
>