Dünyada 10 çeşit insan vardır, binary bilenler ve bilmeyenler.

Cuma, Temmuz 21, 2006

 

Oracle JDBC Connection Properties Problem

// register the Oracle JDBC drivers
OracleDataSource ds = new OracleDataSource();
ds.setURL("jdbc:oracle:thin:hr/oracle@127
.0.0.1:1521:XE");
// create a Connection object and connect to the database
// as store_user using the Oracle JDBC Thin driver
Connection myConnection = ds.getConnection();
Properties p = ds.getConnectionProperties();
System.out.println(p.getProperty("disableDefineColumnType"));
------------------------------------------------------------------------------------
This code will throw "null exception". Because
   Properties p = ds.getConnectionProperties();
line return exactly null :)

Solution: We must set it first.

ref: http://forums.oracle.com/forums/thread.jspa?forumID=99&threadID=403342

Comments: Yorum Gönder



<< Home

Archives

Mayıs 2005   Haziran 2005   Temmuz 2005   Ekim 2005   Mayıs 2006   Haziran 2006   Temmuz 2006   Ağustos 2006   Eylül 2006   Ekim 2006   Kasım 2006   Aralık 2006   Ocak 2007  

This page is powered by Blogger. Isn't yours?