are sqlite prepared statements limited to 32 parameters?

26 views
Skip to first unread message

Rich Stepanski

unread,
Jun 25, 2015, 1:54:43 PM6/25/15
to rob...@googlegroups.com
What is the limit of sqlite prepared statement parameters? I'm finding references to a 999 default, another value set at driver compilation time, or a limit lowered at run time.

When I try to execute a prepared a statement with more than 32 parameters, I get following exception:

java.sql.SQLException: SQLite.Exception: too much SQL parameters

at SQLite.JDBC2z.JDBCStatement.executeQuery(JDBCStatement.java:141)

at SQLite.JDBC2z.JDBCPreparedStatement.executeUpdate(JDBCPreparedStatement.java:119)

...


 Error goes away with fewer parameters. Thanks.

Niklas Therning

unread,
Jun 26, 2015, 2:54:27 AM6/26/15
to Rich Stepanski, rob...@googlegroups.com
This seems to be a limitation with the SQLite JDBC driver built into Android and also RoboVM. It doesn't seem to be any difference when looking at the most recent code from Android's class library either. On Android they actually don't officially support this driver. I'm not sure we wanna patch the code to allow for more parameters. Would probably be better to port over the android.database package so that you can (hopefully) use SQLDroid [1].



Partner LIVE 2015 
September 22-24, 2015
Athens, GA

--
You received this message because you are subscribed to the Google Groups "RoboVM" group.
To unsubscribe from this group and stop receiving emails from it, send an email to robovm+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages