if( ! res.next() ) return lr(err_code.err_noent, "");  idx = 1; ai.value.pass = res.getString(idx++); if( res.wasNull() ) ai.value.pass = ""; ai.value.dir = res.getString(idx++); if( res.wasNull() ) ai.value.dir = ""; ai.value.flags = res.getShort(idx++); if( res.wasNull() ) ai.value.flags = 0;
if( res.next() ) { idx = 1; ai.value.pass = res.getString(idx++); if( res.wasNull() ) ai.value.pass = ""; ai.value.dir = res.getString(idx++); if( res.wasNull() ) ai.value.dir = ""; ai.value.flags = res.getShort(idx++); if( res.wasNull() ) ai.value.flags = 0; } else { ec = err_code.err_noent; ec_msg = ""; }
	public error user_get( user_infoHolder ai )			throws null_error, db_error, except { try {		PreparedStatement st = null;		ResultSet res = null;		try {			st = con.prepareStatement( 				"SELECT pass,dir,flags FROM vq_view_user_get"				+" WHERE id_domain=? AND login=?" );			int idx=1;			st.setInt(idx++, ai.value.id_domain);			st.setString(idx++, ai.value.login.toLowerCase());			res = st.executeQuery();			if( ! res.next() )				return lr(err_code.err_noent, "");			idx = 1;			ai.value.pass = res.getString(idx++);			if( res.wasNull() ) ai.value.pass = "";			ai.value.dir = res.getString(idx++);			if( res.wasNull() ) ai.value.dir = "";			ai.value.flags = res.getShort(idx++);			if( res.wasNull() ) ai.value.flags = 0;		} finally {			try { if(res != null) res.close(); } catch(Exception e) {}			try { if(st != null) st.close(); } catch(Exception e) {}		}		return lr(err_code.err_no, "");	} catch( SQLException e ) {		throw new db_error(e.getMessage(), getClass().getName(), 0);	} catch( NullPointerException e ) {		throw new null_error(e.getMessage(), getClass().getName(), 0);	} catch( Exception e ) {		throw new except(e.getMessage(), getClass().getName(), 0);	} }