Some problem in fetching record
hi
this is my code
try
{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection con=DriverManager.getConnection("jdbc:odbc:project ","scott","tiger");
String s="select siteid from sitedetail1;";
PreparedStatement stmt=con.prepareStatement(s);
ResultSet rs=stmt.executeQuery();
while(rs.next())
{
int i;
for(i=0;rs.next();i++)
{
sid.add(""+rs.getInt(1));
}
}
con.close();
stmt.close();
}
catch(Exception e1)
{
e1.printStackTrace();
}
in this code i have bind database field with combobox
this code is compile and run but proper results r not given
all records in perticular field is not fetch in combo box special 1st record is not fetched fetching is starting from second record.
any logical mistake then please advise me what is correct code