Look at the ResultSetMetaData class.  That should help you.
http://java.sun.com/j2se/1.4/docs/api/java/sql/class-use/ResultSetMetaData.h
tml
Lon

----- Original Message -----
From: "Uma Maheswar" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
Sent: Tuesday, February 12, 2002 1:38 AM
Subject: Getting values from different tables


Hi,
I wanted to know if there is any possiblility of getting all the values from
a Database in a single command.

Example:
I am using it in this way in a browser "select * from "and here is a drop
down box which contains table names" as register,pc,signup" . I select the
table I need from the drop down box and hit the submit button. and I should
get all the values from the database in a table. The problem is I do not
have all the fields in all the databases same. Then how are we going to get
the result.


String tables = req.getParameter("tables");
rs = st.executeQuery("select * from '"+tables+"' ");
while(rs.next()
{
    ??????????
}


Help me.

Uma




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

Reply via email to