![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
![]()
(chat, newsreader, calendar)
|
![]() |
|
Course Notes Table of Contents | Exercises JDBC Short Course Index | Online Training Index
|
Help: Using MetaData |
Working Applet | Help Solution
|
Help is available for each task, or you can go straight to the
source code, which is one particular
solution.
Use Connection.createStatement to do this.
Use Statement.executeQuery to send the SQL
SELECT statement. The results will come back as a ResultSet.
Use the ResultSet.getMetaData method.
Look in the ResultSetMetaData API documentation to find the appropriate methods. Column numbering is based from 1, not 0. There are class constants to compare against for nullableness of columns:
Task 7Print the results.
Gathering and printing can be intermixed.
|
Copyright © 1997 MageLang Institute. All Rights Reserved May-97 Copyright © 1996, 1997 Sun Microsystems Inc. All Rights Reserved |