• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Greenhorn
Posts: 7
Hibernate Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Sheriff
Posts: 22783
131
Eclipse IDE Spring VI Editor Chrome Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Greenhorn
Posts: 13
Eclipse IDE Oracle Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic