D
deepstar
Hey all
I'm trying to generate one list item per Sql row, but the code instead
generates four individual droplists containing one item each. Any ideas
on what might be wrong?
ResultSet rslt = addStmt.executeQuery("SELECT name FROM topic");
ResultSetMetaData rsmd = rslt.getMetaData();
for (int i = 1; i <= rsmd.getColumnCount(); i++) {
while(rslt.next()) {
String getTopic = rslt.getString(i);
getTopic = rslt.getString("name");
%>
<H3>Available topics:</H3>
<br/>
<form METHOD"POST" ACTION="mockup.jsp">
<select size="1" name="view">
<option value="yes"><% out.println(getTopic);%></option>
I'm trying to generate one list item per Sql row, but the code instead
generates four individual droplists containing one item each. Any ideas
on what might be wrong?
ResultSet rslt = addStmt.executeQuery("SELECT name FROM topic");
ResultSetMetaData rsmd = rslt.getMetaData();
for (int i = 1; i <= rsmd.getColumnCount(); i++) {
while(rslt.next()) {
String getTopic = rslt.getString(i);
getTopic = rslt.getString("name");
%>
<H3>Available topics:</H3>
<br/>
<form METHOD"POST" ACTION="mockup.jsp">
<select size="1" name="view">
<option value="yes"><% out.println(getTopic);%></option>