| setBoolean ( index, boolean ) | ใช้กำหนดข้อมูลที่เป็นประเภท boolean ณ ตำแหน่ง ที่กำหนด |
|---|
method:setBoolean ( index, boolean )
return type:void
content:ใช้กำหนดข้อมูลที่เป็นประเภท boolean ณ ตำแหน่ง ที่กำหนด
example:Class.forName ( "sun.jdbc.odbc.JdbcOdbcDriver" ); Connection conn = DriverManager.getConnection ( "jdbc:odbc:Nutt" ); String sql = "SELECT * FROM person WHERE sex = ?"; PreparedStatement pstat = conn.preparedStatement ( sql, ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_READ_ONLY ); pstat.setBoolean ( 0, true ); Result rs = pstat.executeQuery ( );