This week's book giveaway is in the OCAJP forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide 1Z0-808 and have Jeanne Boyarsky & Scott Selikoff on-line! See this thread for details.
This statement has a SetString method.I want to know to which it is going to Set. My code is below: String sqlSelect="select username,password from userinfo where username=? and password=?"; pst=conn.prepareStatement(sqlSelect); pst.setString(1,uinfo.getUserName()); pst.setString(2,uinfo.getPassWord());
User. It reads the ?'s in order they are in the SQL query string. The database does not rearrange them. Actually a better way to say it is that the database doesn't even see the prepared statement, it just sees the finalized SQL string with the values filled in. [ October 04, 2007: Message edited by: Scott Selikoff ]