Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

com.sybase.jdbc2.jdbc.SybSQLException: Too many parameters -- symbol table overflow.

 
Hari Ganesan
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hii all,

I am using jconn2.jar(5.5) jdbc driver for Sybase to connect
to a sybase database from a standalone java application.
My jave application will read thousands of
records from a text file and insert in to the table in the
sybase database.
I have a select query with IN clause.This IN clause will have more than 10,000 values. while executing this query, the
application is returning the below error:

Caused by: com.sybase.jdbc2.jdbc.SybSQLException: Too many
parameters -- symbol table overflow.

at com.sybase.jdbc2.tds.Tds.processEed(Tds.java:3281)
at com.sybase.jdbc2.tds.Tds.nextResult(Tds.java:2548)
at
com.sybase.jdbc2.jdbc.ResultGetter.nextResult(ResultGetter.java:69)
at
com.sybase.jdbc2.jdbc.SybStatement.nextResult(SybStatement.java:220)
at
com.sybase.jdbc2.jdbc.SybStatement.nextResult(SybStatement.java:203)
at
com.sybase.jdbc2.jdbc.SybStatement.queryLoop(SybStatement.java:1614)
at
com.sybase.jdbc2.jdbc.SybStatement.executeQuery(SybStatement.java:1599)
at
com.sybase.jdbc2.jdbc.SybPreparedStatement.executeQuery(SybPreparedStatement.java:96)

at
org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:93)

at
org.springframework.jdbc.core.JdbcTemplate$1.doInPreparedStatement(JdbcTemplate.java:648)

at
org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:591)
... 10 more

The same query is working well for values in IN clause with
up to 10,000 values.

I tried with jconnect6 and jconnect7. but same result.

Anyone is having any idea, why it's
returning the error like above for the values having more
than 10,000?

Thanks in advance
 
Janarthanan Rajendran
Greenhorn
Posts: 7
Hibernate Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The error is clear , the number of parameters passed and the number of columns in table are not matching. Please compare the parameters list with the table column list.

Regards,
Jana
 
Rob Spoor
Sheriff
Pie
Posts: 20751
68
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A query with 10,000 values in an IN clause sounds dubious to me. That looks like you get the results of one query and put them in an IN clause of another query. Unless you have a handicapped SQL server you should then use a nested query instead.
 
Horst Stieg
Greenhorn
Posts: 13
Eclipse IDE Java Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I remember from my time working with Sybase (direct queries, not with Java), that you can use not more than X values with IN. I don't remember what X was, though, but I think, it was less than 10.000. We had some strange effects in our queries and found this out by experimenting.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic