wood burning stoves 2.0*
The moose likes JDBC and the fly likes Oracle CHAR bind parameter Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Oracle CHAR bind parameter" Watch "Oracle CHAR bind parameter" New topic
Author

Oracle CHAR bind parameter

Bikram Rathod
Greenhorn

Joined: Jul 26, 2005
Posts: 1
We are using Prepared Statement to access oracle 9i database from a Java application. For a CHAR datatype in Oracle we are using the String datatype as binding parameter. It works fine when the search criteria is Partial Search(using 'LIKE' clause). It fails when the search criteria is supposed to be equal match (=). By fail I mean 0 Records are returned . But when the query is run standalone on SQLPLUS it returns records. Has anybody encountered any such situation.
Shailesh Chandra
Ranch Hand

Joined: Aug 13, 2004
Posts: 1081

could you paste your code and query to put better clarity on your problem

Shailesh


Gravitation cannot be held responsible for people falling in love ~ Albert Einstein
Sonny Gill
Ranch Hand

Joined: Feb 02, 2002
Posts: 1211

try TRIM() on both sides of the '=' comparison.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Oracle CHAR bind parameter
 
Similar Threads
Inserting Blob throws Exception
urlyBird search requirement
find method signature and synchronized.
Confuse the findByCriteria()
Working with Jrun and OracleTypes.ARRAY