At least in some versions of sybase 
DatabaseMetaData.getColumns() doesn't 
work.

We use the following as a workaround:

select * from 'tablename' where 1 <> 1

and use ResultSetMetaData to find the 
columns. Dirty trick, but works with 
any database we tested (Adabas D, 
Oracle 8i, Sybase ASA, Interbase, 
Cloudscape, Instant DB, Postgres,
MS SQL)

> -----Ursprüngliche Nachricht-----
> Von: Jim Cheesman [mailto:[EMAIL PROTECTED]]
> Gesendet: Mittwoch, 19. Dezember 2001 09:42
> An: Tomcat Users List
> Betreff: Re: Code request; Code to reveal a DB schema
> 
> 
> At 06:04 AM 19/12/01, you wrote:
> >I'm looking for some dynamic code that will reveal all 
> libraries, files,
> >fields in a DB Does anyone have an example or can you point 
> me in the right
> >direction?
> 
> 
> java.sql.DatabaseMetaData is your friend!
> 
> 
> 
> 
> 
> --
> 
>                            *   Jim Cheesman   *
>              Trabajo: 
> [EMAIL PROTECTED] - (34)(91) 724 9200 x 2360
>               I'm still not sure 
> if I understand ambiguity.
> 
> 
> 
> --
> To unsubscribe:   <mailto:[EMAIL PROTECTED]>
> For additional commands: <mailto:[EMAIL PROTECTED]>
> Troubles with the list: <mailto:[EMAIL PROTECTED]>
> 
> 
> 

--
To unsubscribe:   <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>

Reply via email to