java.sql.SQLException: [BEA][SQLServer JDBC Driver]Unsupported data conversion.
at weblogic.jdbc.base.BaseExceptions.createException(Unknown Source)
at weblogic.jdbc.base.BaseExceptions.getException(Unknown Source)
at weblogic.jdbc.base.BaseData.unsupportedConversion(Unknown Source)
at weblogic.jdbc.base.BaseData.getTimestamp(Unknown Source)
at weblogic.jdbc.base.BaseResultSet.getTimestamp(Unknown Source)
at weblogic.jdbc.base.BaseResultSet.getTimestamp(Unknown Source)
at weblogic.jdbc.wrapper.ResultSet_weblogic_jdbc_base_BaseResultSet.getT
imestamp(Unknown Source)
Steven Yip wrote:
Hi. There have been some recent fixes to the BEA drivers. Contact support and get the
very latest versions. If that doesn't fix it, I will. Let me know...
What driver were you using before that worked?
thanks,
Joe
Thanks for your help. I was using the jDriver that Weblogic provided. BTW, if you have the solution for that, pls let me know. Thanks.
Steven Yip wrote:
Hi. Well, two things: The jDriver is still useable and supported for the
life of our 8.1 release. Also, can you tell me when you upgraded the drivers
in your 8.1 server? I want to know if you have the very latest. Can you run
this code and tell me what it prints?
DatabaseMetaData dm = con.getMetaData();
System.out.println( dm.getDriverVersion() );
Our latest available drivers are 3.3.0067 or 3.4.0032.
If you have the problem with either of these latest versions, I will
get you a fix.
Joe
Steven Yip wrote:
> The version is 3.3.43 (008849.005014.006336)
Ok, so contact support and get the latest upgrade to the
dirvfer, and see if the bug is fixed. You should now
be able to get Version 3.3.0074.
Joe
Steven Yip wrote:
> I tried to run the application under WLS8.1sp4 and shown that its version
> is 3.40.19 (012727.007216.008716); however, the problem persists.
Hi Steven. I think something else must be wrong. I can't duplicate it.
Here's a small program. Change it to your user, password, dbms etc,
and see if you can alter it to get it to show the problem.
What is your table definition?
thanks,
Joe
import java.io.*;
import java.util.*;
import java.net.*;
import java.sql.*;
import weblogic.common.*;
public class ddora
{
public static void main(String argv[])
throws Exception
{
Connection c = null;
try
{
java.util.Properties props = new java.util.Properties();
props.put("user", "scott");
props.put("password", "tiger");
props.put("SID", "JOE");
Driver d = (Driver)Class.forName("weblogic.jdbc.oracle.OracleDriver").newInstance();
c = d.connect("jdbc:bea:oracle://JOE:1521", props);
System.out.println("Driver version is " + c.getMetaData().getDriverVersion());
Statement s = c.createStatement();
try{s.executeUpdate("drop table joe");} catch (Exception ignore){}
s.executeUpdate("create table joe "
+ " ( DATEOBJ DATE NULL)"
);
s.executeUpdate("insert into joe values(NULL)");
ResultSet rs = s.executeQuery("SELECT * FROM JOE");
rs.next();
rs.getTimestamp(1);
}
catch (Exception e)
{ e.printStackTrace(); }
finally
{ try {c.close();}catch (Exception e){} }
}
}