Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / Databases / October 2007

Tip: Looking for answers? Try searching our database.

jdbc and DB2

Thread view: 
Corona4456 - 21 Sep 2007 01:30 GMT
How would you go about getting a list of tables from db2 using jdbc?
Roedy Green - 21 Sep 2007 05:04 GMT
>How would you go about getting a list of tables from db2 using jdbc?

see http://mindprod.com/jgloss/sql.html
Signature

Roedy Green Canadian Mind Products
The Java Glossary
http://mindprod.com

Corona4456 - 21 Sep 2007 06:39 GMT
> >How would you go about getting a list of tables from db2 using jdbc?
>
> seehttp://mindprod.com/jgloss/sql.html
> --
> Roedy Green Canadian Mind Products
> The Java Glossaryhttp://mindprod.com

Thanks but I'm not going to buy a book for this one problem.
Dyreatnews@sun.com - 21 Sep 2007 14:56 GMT
>> >How would you go about getting a list of tables from db2 using jdbc?
>>
[quoted text clipped - 4 lines]
>
> Thanks but I'm not going to buy a book for this one problem.

So you didn't even bother to check the link, did you? That attitude
will not encourage people to help you...

Signature

dt

However, experience shows that for many people and many applications a
dose of paranoia is reasonable - Bjarne Stroustrup

bcr666 - 21 Sep 2007 15:47 GMT
> > >How would you go about getting a list of tables from db2 using jdbc?
>
[quoted text clipped - 4 lines]
>
> Thanks but I'm not going to buy a book for this one problem.

query the system tables

select name from sysibm.sysTables
Roedy Green - 21 Sep 2007 16:43 GMT
>Thanks but I'm not going to buy a book for this one problem.

It is not a book, it is a web page with a number of SQL coding
examples on it.
Signature

Roedy Green Canadian Mind Products
The Java Glossary
http://mindprod.com

Corona4456 - 21 Sep 2007 19:04 GMT
On Sep 21, 9:43 am, Roedy Green <see_webs...@mindprod.com.invalid>
wrote:

> >Thanks but I'm not going to buy a book for this one problem.
>
[quoted text clipped - 3 lines]
> Roedy Green Canadian Mind Products
> The Java Glossaryhttp://mindprod.com

Well it's not the SQL part I'm having problems with... it's how to do
it in Java using JDBC that's the problem.  Is there an example on that
website that does just that?
Corona4456 - 21 Sep 2007 19:12 GMT
> On Sep 21, 9:43 am, Roedy Green <see_webs...@mindprod.com.invalid>
> wrote:
[quoted text clipped - 10 lines]
> it in Java using JDBC that's the problem.  Is there an example on that
> website that does just that?

Nevermind... I missed it in the API for java.sql.Connection.  There's
a function called getTables()... D'uh! heh...
Corona4456 - 21 Sep 2007 19:16 GMT
> On Sep 21, 9:43 am, Roedy Green <see_webs...@mindprod.com.invalid>
> wrote:
[quoted text clipped - 10 lines]
> it in Java using JDBC that's the problem.  Is there an example on that
> website that does just that?

Err... correction it's not Connection... the connection can return a
DatabaseMetaData object which contains that function... bleh...
Alfred - 14 Oct 2007 15:09 GMT
> How would you go about getting a list of tables from db2 using jdbc?

Use DatabaseMetaData and the methods like:

- getCatalogs()
- getSchemas()
- getTables()

Do not use SQL-Statements for that! And have a look
to your Java-API-Reference.

Alfred


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.