wood burning stoves 2.0*
The moose likes JDBC and the fly likes VARCHAR2 TO CHAR - not records returned. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "VARCHAR2 TO CHAR - not records returned." Watch "VARCHAR2 TO CHAR - not records returned." New topic
Author

VARCHAR2 TO CHAR - not records returned.

Prasad Potla
Greenhorn

Joined: Nov 07, 2003
Posts: 3
Hi All,

I changed a oracle table column types from varchar2 to char for making the job of other teams easy since they have legacy systems.

I was using the prepared statements to query on the table and was using setString(1,pnum) to pass the part number as parameter. After the varchar2 to char change prepared statements stopped working.

If I query on the table with statement, it is working. [ I was appending the pnum as in the string to make to work].

Did anyone experienced this kind of problem, or if anyone know the solution for this problem. Please let me know.

Thanks
P
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18541
    
    8

"pr po", welcome to JavaRanch.

We're a friendly group here, but we do require members to have valid display names.

Display names must contain your first name, a space, then your last name. Fictitious names are not allowed.

Please edit your profile and correct your display name since accounts with invalid display names will be deleted.

And, after you do that, could you explain further what "working" and "not working" mean in relation to your problem?
Prasad Potla
Greenhorn

Joined: Nov 07, 2003
Posts: 3
Originally posted by Pr Po:
Hi All,

I changed a oracle table column types from varchar2 to char for making the job of other teams easy since they have legacy systems.

I was using the prepared statements to query on the table and was using setString(1,pnum) to pass the part number as parameter. After the varchar2 to char change prepared statements stopped working.

If I query on the table with statement, it is working. [ I was appending the pnum as in the string to make to work].

Did anyone experienced this kind of problem, or if anyone know the solution for this problem. Please let me know.

Thanks
P
Prasad Potla
Greenhorn

Joined: Nov 07, 2003
Posts: 3
I solved the problem by changing the driver.
 
Don't get me started about those stupid light bulbs.
 
subject: VARCHAR2 TO CHAR - not records returned.
 
Similar Threads
About loading external files in Oracle 9i
PreparedStatement
Need to insert 1.5 into a sql colunm on Number(2,2)
processing resultset
Oracle Driver vs Weblogic Driver