Discovered this rs.next logic error while doing Query exercise at experimental.

Not sure if this is a reported bug. So i am changing it from IF to WHILE as it is clearly asking for an array and not a single record.
This commit is contained in:
Redhuan D. Oon 2008-11-19 01:58:08 +00:00
parent 23d595b1f5
commit 19d5a467f6
1 changed files with 1 additions and 1 deletions

View File

@ -115,7 +115,7 @@ public class MStatus extends X_R_Status
pstmt = DB.prepareStatement (sql, null);
pstmt.setInt(1, AD_Client_ID);
ResultSet rs = pstmt.executeQuery ();
if (rs.next ())
while (rs.next ())
list.add(new MStatus (ctx, rs, null));
rs.close ();
pstmt.close ();