aspose file tools
The moose likes JDBC and the fly likes Oracle driver vs Weblogic driver Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Reply Bookmark "Oracle driver vs Weblogic driver" Watch "Oracle driver vs Weblogic driver" New topic
Author

Oracle driver vs Weblogic driver

Sam Phillip
Greenhorn

Joined: Oct 05, 2004
Posts: 5
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
internet detective
Marshal

Joined: May 26, 2003
Posts: 26218
    
  66

Sam,
Welcome to JavaRanch!

That is one weird error. Does it work with varchar2 if you do the query from sqlplus?


[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
Sam Phillip
Greenhorn

Joined: Oct 05, 2004
Posts: 5
Jeanne, it works from sqlplus with varchar2

/ Sam
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Oracle driver vs Weblogic driver
 
Similar Threads
Inserting image into the oracle database
PreparedStatement binding not working properly (Oracle Problem?)
Oracle Driver vs Weblogic Driver
Reading UDT values using JDBC
How to store & retrieve a video file from database?