Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public String selectCategoryByID( int id ){
- String name = "";
- synchronized( this ){
- if( connect() ){
- try {
- state = con.prepareStatement("select * from airplanecategory where id = ?");
- state.setInt(1, id);
- result = state.executeQuery();
- while( result.next() )
- name = result.getString( "genre" );
- } catch( SQLException e ){
- throw new DataAccessException("");
- } finally {
- disconnect();
- }
- }
- }
- return name;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement