tables rows problem with access
dear people..
in this code i wanted to get all rows from table "topic"
and add them to string "subject"
and the string "subject"
with be sent over a socket to a client
the client will only tokenize them and add every token
to a combo box.
when the program runs
the client adds "ONLY" the last row from the whole table
why that
?
can any one fix the problem
try
{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection con1 = DriverManager.getConnection("jdbc:odbc:votedb");
String sat="select topicid,subject from topic";
PreparedStatement ps = con1.prepareStatement(sat);
String subject=null;
while(rs.next())
{
String linein=rs.getString(1);
String linein2=rs.getString(2);
subject=linein+"-"+linein2;
}
out.println(subject);
}
catch(Exception e){}

