aspose file tools*
The moose likes JDBC 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
Bookmark "invalid number error " Watch "invalid number error " New topic
Author

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
internet detective
Marshal

Joined: May 26, 2003
Posts: 29259
    
140

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


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: invalid number error
 
Similar Threads
Creating an SQL procedure
How to use the getDate() method with a callable statement?
using :new in oracle JDBC Query
Oracle Procedure problem
Problem retrieving output from stored procedured