----- Original Message -----
Sent: Monday, February 11, 2002 11:21
AM
Subject: RE: Resultset...
System.out.println(rs3.getString("\"" +
caseNoName + "\""));
The extra quotes
are not necessary. Change this line to:
System.out.println(rs3.getString(caseNoName));
and it should
work.
Hello all...
Scenario:
...
String selectCaseQuery = "Select * from " +
dbTableName + " order by " + caseNoName;
Statement stmt = con.createStatement();
ResultSet rs = stmt.executeQuery();
...
My question is, when retrieving the resultset
is it possible to specify a variable in the getString methods of
Resultset:
For instance:
...
while(rs3.next()){
System.out.println(rs3.getString("\""
+ caseNoName + "\"")); //I have tried this but to no avail, is there a
workaround!?
}
...
I have tried the above statement but it
dosen't seem to work and i know why. But is there some
workaround. When I ask my users for a columnName of the database they
intend to use, I must specify that name in the getString methods.
Any and all help is greatly
appreciated!
jags