|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
How to get TableNames and column names of FireBird using DatabaseMetaData of Java
Dear Friends,
I have created a db called test. Now I have created some tables. Now I want to retrieve the table names which I have created, also the column names of the created table. Using DatabaseMetaData class we can get the same. If I try with DatabaseMetaData class I am getting schemas are not supported error. Can any one help me out how to get the same for FireBird. regards, rajagopal. |
|
#2
|
|||
|
|||
|
use system table rdb$relations
select rdb$relation_name from rdb$relations where rdb$flags IS NOT NULL; |
|
#3
|
|||
|
|||
|
Quote:
|
|
#4
|
||||
|
||||
|
Quote:
__________________
My blog Tutorials about OSS databases, DBMonster ... Contribute to OSS Development, fill bug reports! Developer Shed eSupport Commented my.ini/my.cnf (ADD YOUR OWN CONFIG TRICK) An introduction to database normalization Natural or Surrogate key Custom ordering for your results Correlated and uncorrelated subqueries Don't turn your outer joins into inner joins Random data (with a bias) |
|
#5
|
|||
|
|||
|
Quote:
Because I can successfully retrieve the tables in a Firebird database using DatabaseMetaData, that's why I suggested to show the Java code. |
|
#6
|
||||
|
||||
|
I'm out of date
, BTW, which version is the OP using? |
|
#7
|
|||
|
|||
|
Just curious.
How did this thread come to life after four years? (Original post November 2003) Clive. |
|
#8
|
|||
|
|||
|
Quote:
|
|
#9
|
|||
|
|||
|
Why this Thread come to life
Quote:
The reason is: I had problems to receive the tablenames with DatabaseMetaData the old (and working) driver interclient.jar does not answer, it hangs. I found as alternative the system table rdb$relation_name usable in an ordinary select statement. Ok, other drivers may be able to answer with DatabaseMetaData, but they have other problems |
![]() |
| Viewing: Dev Shed Forums > Databases > Firebird SQL Development > How to get TableNames and column names of FireBird using DatabaseMetaData of Java |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|