help!!- jdbc prepared statement=error ora-01008

From: Swahanaga <sfinkelman_at_cncdsl.com>
Date: 1999/11/22
Message-ID: <383925F2.DC70B70E_at_cncdsl.com>#1/1


Hi,
I'm having trouble with a group of prepared statements. java1.2.2,
oracle8i on Solaris
solaris database,
jbuilder2.0 on NT.
oracle8.1.5 thin driver.
and include java.sql.* as the library.

I;ve been debugging the same line of code for several hours now.

I'm using the prepared statement. It works very strangely. I'm using multiple queries with the same prepared statement and result set. I set them to null before I start this query. The queries before this one work fine, the queries after this one work fine. The difference is that the queries which work, are on tables containing only text fields. This query has text and number fields, however the number fields are only returned, not parameterized. It is the only one which uses mixed fields and the only one which returns errors.

the prepared statement is something like this:

        "select * from Table where column like ?"

I bind the variable:

        pstmt.setString(1, paramName);
Then I get the error ora-01008, not all variables bound. I bind only this one field, I have only one question mark in the query. I've checked the values going in and everything looks ok.

I've tried exchanging the ? with a string and eliminating the pstmt.setString, this works.

I've tried exchanging the paramName with the same string, this doesn't work
I've tried adding pstmt.clearParameters, this doesn't work.

I'm stumped, what am I overlooking?

any help appreciated,
Thanks,
Steven Finkelman Received on Mon Nov 22 1999 - 00:00:00 CET

Original text of this message