Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Oracle driver vs Weblogic driver

 
Sam Phillip
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I am using weblogic 8.1 sp2 with Oracle 9i.
Following is an excerpt from my code :

Connection conn = getDataSource().getConnection();
PreparedStatement statement = conn.prepareStatement("SELECT
TempID FROM SAM_ADMIN WHERE AOF = ?");
statement.setString(1, "9999");
ResultSet resultSet = statement.executeQuery();

The problem I am facing is AOF is of type CHAR, when the column type is
changed to VARCHAR2 both drivers ( weblogic and oracle )find the record.
I can't find the record with oracle.jdbc.driver.OracleDriver when the column type is defined as CHAR?

Weblogic driver : weblogic.jdbc.oracle.OracleDriver

Please help me as this is acting as a show stopper.

Thanks,
/ Sam
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34095
337
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sam,
Welcome to JavaRanch!

That is one weird error. Does it work with varchar2 if you do the query from sqlplus?
 
Sam Phillip
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jeanne, it works from sqlplus with varchar2

/ Sam
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic