Java CallableStatement getString() method with example

java.sql.CallableStatement.getString() method Retrieves the value of the designated JDBC
LONGVARCHAR parameter as a
String in the Java programming language.

For the fixed-length type JDBC CHAR, the String object returned has exactly the same value the SQL CHAR value had in the database, including any padding added by the database.

CallableStatement getString() method Signature

String getString(int parameterIndex) throws SQLException


parameterIndex – the first parameter is 1, the second is 2, and so on


the parameter value. If the value is SQL
NULL, the result is


SQLException – if the parameterIndex is not valid; if a database access error occurs or this method is called on a closed

See Also:

setString(java.lang.String, java.lang.String)

java.sql.CallableStatement.getString() method Implementation

String getString(int parameterIndex) throws SQLException{

CallableStatement getString() method Example


public class GetStringMethodExample {

	public static void main(String[] args) {




Ask your questions in eHowToNow Forum

Post your technical, non-technical doubts, questions in our site. Get answer as soon as possible, meanwhile you can help others by answering, unanswered questions.
To Ask new Question : Ask Question
Check our existing discussions : Questions & Answers

  1. Java Files newBufferedReader() method with example
  2. Java JTree setEditable() method with example
  3. Java JTable getPrintable() method with example
  4. Java – RSAKeyGenParameterSpec Class
  5. Java BasicTreeUI completeEditing() method with example
  6. Java AclEntry.Builder setPermissions() method with example 3
  7. Java JTable.AccessibleJTable getSelectedAccessibleColumns() method with example
  8. Java MBeanOperationInfo getReturnType() method with example
  9. Java JProgressBar setMinimum() method with example
  10. Java BandedSampleModel getPixels() method with example
  11. Java JTree.AccessibleJTree treeStructureChanged() method with example
  12. Java _DynEnumStub get_as_ulong() method with example
  13. Java BasicRadioButtonUI uninstallDefaults() method with example
  14. Java AccessibleText getIndexAtPoint() method with example
  15. Java GapContent getPositionsInRange() method with example

Be the first to comment

Leave a Reply