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

invalid number error

 
krishna prasad gunasekaran
Ranch Hand
Posts: 158
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
good day,
this is my java code
callableStatement = connection.prepareCall("{call pkg_abc.prget(?,?,?,?,?,?,?,?,?,?,?)}");

i send a string of numbers("12,13,14,15"),which i generate randomly, to db procedure. i use an sql statement to get rows that match the numbers.

procedure code:
v_column_values := p_column_values, where p_column_values is "12,13,14,15"
select * from clauses where num_clause_id in (v_column_values);

previously, everything was working fine. i didn't change the procedure. suddenly, this error occurred. why is this happening.
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 35279
384
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Krisp,
JDBC does not support passing a string of multiple values to an in clause. I'm surprised this worked at all.

Two things I can think of that might have caused it suddenly manifesting:
1) Maybe only one value was passed before
2) Maybe the driver changed from one that was more accomodating
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic