Here you can find the source of getStringSuppressSQLException(final ResultSet rs, final String columnLabel)
Parameter | Description |
---|---|
rs | a parameter |
columnLabel | a parameter |
public static String getStringSuppressSQLException(final ResultSet rs, final String columnLabel)
//package com.java2s; /**//from w w w . j a va2s . co m * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this file, * You can obtain one at http://mozilla.org/MPL/2.0/. */ import java.sql.ResultSet; import java.sql.SQLException; public class Main { /** * Retrieves the value of the designated column in the current row of this ResultSet object * as a String in the Java programming language suppressing SQLException * * @param rs * @param columnLabel * @return string value */ public static String getStringSuppressSQLException(final ResultSet rs, final String columnLabel) { String columnValue = null; try { columnValue = rs.getString(columnLabel); } catch (SQLException ex) { } return columnValue; } }