Here you can find the source of getString(ResultSet p_rset, int p_col)
Parameter | Description |
---|---|
p_rset | ResultSet object on which to perform get |
p_col | int representing the column position in the ResultSet |
public static final String getString(ResultSet p_rset, int p_col)
//package com.java2s; /**//from w w w.j a v a2s . c o m * Database functionality abstraction utilities. * * Supported drivers: * - Oracle * - PostgreSQL * - MySQL (incomplete) * - hsql DB (incomplete) * - DB2 (incomplete) * * Copyright (c) 2001-2004 Marc Lavergne. All rights reserved. * * The following products are free software; Licensee can redistribute and/or * modify them under the terms of the GNU Lesser General Public License * (http://www.gnu.org/copyleft/lesser.html) as published by the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111- 1307 USA; * either version 2.1 of the license, or any later version: */ import java.sql.*; public class Main { /** * static method for handling positional column gets for String values * @param p_rset ResultSet object on which to perform get * @param p_col int representing the column position in the ResultSet * @return String containing the value at p_col, otherwise NULL */ public static final String getString(ResultSet p_rset, int p_col) { try { return p_rset.getString(p_col); } catch (SQLException e_sql) { return null; } } }