jQuery in Action, 3rd edition
The moose likes JDBC and Relational Databases and the fly likes invalid number error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "invalid number error " Watch "invalid number error " New topic

invalid number error

krishna prasad gunasekaran
Ranch Hand

Joined: Jul 25, 2006
Posts: 158
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.

have a great day,
krishna prasad
Jeanne Boyarsky
author & internet detective

Joined: May 26, 2003
Posts: 33125

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

[OCA 8 book] [Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
I agree. Here's the link: http://aspose.com/file-tools
subject: invalid number error
It's not a secret anymore!