drill-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daniel Barclay (Drill) (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (DRILL-2494) Binding parameters to a PreparedStatement throws a SQLException
Date Thu, 18 Jun 2015 21:02:00 GMT

     [ https://issues.apache.org/jira/browse/DRILL-2494?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Daniel Barclay (Drill) updated DRILL-2494:
------------------------------------------
    Summary: Binding parameters to a PreparedStatement throws a SQLException  (was: JDBC :
Binding parameters to a PreparedStatement throws a SQLException)

> 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)
>             Fix For: 1.1.0
>
>         Attachments: DRILL-2494.1.patch.txt
>
>
> git.commit.id.abbrev=7b4c887
> Code :
> {code}
>     prepStatement = conn.prepareStatement("SELECT int_col AS INTCOL FROM dfs.jdbctesting.fewtypes_txt_view
where int_col > ?");
>     prepStatement.setInt(1, 20);
> {code}
> The above code resulted in the below exception
> {code}
> 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)
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message