drill-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rahul Challapalli (JIRA)" <j...@apache.org>
Subject [jira] [Created] (DRILL-2494) JDBC : Binding parameters to a PreparedStatement throws a SQLException
Date Wed, 18 Mar 2015 17:39:40 GMT
Rahul Challapalli created DRILL-2494:

             Summary: JDBC : Binding parameters to a PreparedStatement throws a SQLException
                 Key: DRILL-2494
                 URL: https://issues.apache.org/jira/browse/DRILL-2494
             Project: Apache Drill
          Issue Type: Bug
          Components: Client - JDBC
            Reporter: Rahul Challapalli
            Assignee: Daniel Barclay (Drill)


Code :
    prepStatement = conn.prepareStatement("SELECT int_col AS INTCOL FROM dfs.jdbctesting.fewtypes_txt_view
where int_col > ?");
    prepStatement.setInt(1, 20);

The above code resulted in the below exception
Exception in thread "main" java.sql.SQLException: parameter ordinal 1 out of range
	at net.hydromatic.avatica.Helper.createException(Helper.java:44)
	at net.hydromatic.avatica.AvaticaPreparedStatement.getParameter(AvaticaPreparedStatement.java:246)
	at net.hydromatic.avatica.AvaticaPreparedStatement.setInt(AvaticaPreparedStatement.java:105)
	at Dummy.testBindParamsPrepStatement(Dummy.java:57)
	at Dummy.main(Dummy.java:30)

This message was sent by Atlassian JIRA

View raw message