Skip to content
Advertisement

ArrayOutOfBoundsException on PreparedStatement

I’m at a loss here, can anyone see what’s wrong with this code? I’m using sqlite with this driver: https://bitbucket.org/xerial/sqlite-jdbc/downloads

edit: fixed my initial error but have a similar one

JavaScript

I get an exception at this line:

stmt.setLong(1, tweet.getID());

The exception:

JavaScript

This is how I created the table

JavaScript

Advertisement

Answer

As per the docs at http://docs.oracle.com/javase/7/docs/api/java/sql/PreparedStatement.html#setLong(int,%20long)

JavaScript
User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement