Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Oracle 10g JDBC question

Reply
Thread Tools

Oracle 10g JDBC question

 
 
waynes_zhong@yahoo.com
Guest
Posts: n/a
 
      05-06-2005
Hi,

I am currently using oracle/jdbc/lib/classes12.zip to connect to
Oracle8i:

String driver="oracle.jdbc.driver.OracleDriver";
String url="jdbcracle:thin:@serverName:1521:dbName";
String username="myOracleUsername";
String password="myOraclePassword";

(Setting: JDK1.4; Tomcat4)

Now, if the db is upgraded to 10g, what do I expect in terms of jdbc
driver settings?

Thanks,

Wayne

 
Reply With Quote
 
 
 
 
Igor Kolomiyets
Guest
Posts: n/a
 
      05-06-2005
No changes necessary. I think it would even work with the same driver
but it is a wise thing to do to use new driver bundled with the 10g client.

http://www.velocityreviews.com/forums/(E-Mail Removed) пишет:
> Hi,
>
> I am currently using oracle/jdbc/lib/classes12.zip to connect to
> Oracle8i:
>
> String driver="oracle.jdbc.driver.OracleDriver";
> String url="jdbcracle:thin:@serverName:1521:dbName";
> String username="myOracleUsername";
> String password="myOraclePassword";
>
> (Setting: JDK1.4; Tomcat4)
>
> Now, if the db is upgraded to 10g, what do I expect in terms of jdbc
> driver settings?
>
> Thanks,
>
> Wayne
>

 
Reply With Quote
 
 
 
 
Malte
Guest
Posts: n/a
 
      05-06-2005
(E-Mail Removed) wrote:
> Hi,
>
> I am currently using oracle/jdbc/lib/classes12.zip to connect to
> Oracle8i:
>
> String driver="oracle.jdbc.driver.OracleDriver";
> String url="jdbcracle:thin:@serverName:1521:dbName";
> String username="myOracleUsername";
> String password="myOraclePassword";
>
> (Setting: JDK1.4; Tomcat4)
>
> Now, if the db is upgraded to 10g, what do I expect in terms of jdbc
> driver settings?
>
> Thanks,
>
> Wayne
>


I use a connection String like yours for 9i and 10G without any changes
necessary (for the thin driver).
 
Reply With Quote
 
Dimitri Maziuk
Guest
Posts: n/a
 
      05-07-2005
(E-Mail Removed) sez:
> Hi,
>
> I am currently using oracle/jdbc/lib/classes12.zip to connect to
> Oracle8i:
>
> String driver="oracle.jdbc.driver.OracleDriver";
> String url="jdbcracle:thin:@serverName:1521:dbName";
> String username="myOracleUsername";
> String password="myOraclePassword";
>
> (Setting: JDK1.4; Tomcat4)
>
> Now, if the db is upgraded to 10g, what do I expect in terms of jdbc
> driver settings?


Old driver may not work. I forget what the error message was,
something to do with NLS charset. (Happens on some systems and
update 3 of 10g.)

New dirver is oracle.jdbc.OracleDriver. The one with .driver.
is still supported for backwards compatibility but all new
features go into the new one.

Dima
--
One distinguishing characteristic of BOFHen is attention deficit disorder.
Put me in front of something boring and I can find a near-infinite number
of really creative ways to bugger off. -- ADB
 
Reply With Quote
 
steve
Guest
Posts: n/a
 
      05-07-2005
On Fri, 6 May 2005 22:45:43 +0800, (E-Mail Removed) wrote
(in article <(E-Mail Removed) .com>):

> Hi,
>
> I am currently using oracle/jdbc/lib/classes12.zip to connect to
> Oracle8i:
>
> String driver="oracle.jdbc.driver.OracleDriver";
> String url="jdbcracle:thin:@serverName:1521:dbName";
> String username="myOracleUsername";
> String password="myOraclePassword";
>
> (Setting: JDK1.4; Tomcat4)
>
> Now, if the db is upgraded to 10g, what do I expect in terms of jdbc
> driver settings?
>
> Thanks,
>
> Wayne
>


your drivers are out of date, you should be using atleast ocrs12.zip
,ojdbc14.jar.

settings should be the same, I.E it works for me when i went from 8i to 9i
to 10G

 
Reply With Quote
 
.
Guest
Posts: n/a
 
      05-09-2005
On Fri, 6 May 2005 (E-Mail Removed) wrote:

> Hi,
>
> I am currently using oracle/jdbc/lib/classes12.zip to connect to
> Oracle8i:
>
> String driver="oracle.jdbc.driver.OracleDriver";
> String url="jdbcracle:thin:@serverName:1521:dbName";
> String username="myOracleUsername";
> String password="myOraclePassword";
>
> (Setting: JDK1.4; Tomcat4)
>
> Now, if the db is upgraded to 10g, what do I expect in terms of jdbc
> driver settings?


If you switch to 10g you should switch to the drivers in ojdbc14.jar.
There will be no changes to your code.

NOTE: you can continue to use the classes12.zip but many things will not
work. It is not JDBC 3.0 compliant. The driver in ojdbc14.jar is up to
date and supports JDBC 3.0 APIs.

--
Send e-mail to: darrell dot grainger at utoronto dot ca

 
Reply With Quote
 
Dave Ockwell-Jenner
Guest
Posts: n/a
 
      05-13-2005
(E-Mail Removed) wrote:
> Hi,
>
> I am currently using oracle/jdbc/lib/classes12.zip to connect to
> Oracle8i:
>
> String driver="oracle.jdbc.driver.OracleDriver";
> String url="jdbcracle:thin:@serverName:1521:dbName";
> String username="myOracleUsername";
> String password="myOraclePassword";
>
> (Setting: JDK1.4; Tomcat4)
>
> Now, if the db is upgraded to 10g, what do I expect in terms of jdbc
> driver settings?


You should also be careful if you intend on working with DATE columns...
have a look at:

http://www.oracle.com/technology/tec..._faq.htm#08_01

.... which explains the situation nicely!

--
Dave Ockwell-Jenner
Solar Nexus Solutions
http://www.solar-nexus.com/
 
Reply With Quote
 
Joe Weinstein
Guest
Posts: n/a
 
      05-13-2005


Dave Ockwell-Jenner wrote:
> (E-Mail Removed) wrote:
>
>> Hi,
>>
>> I am currently using oracle/jdbc/lib/classes12.zip to connect to
>> Oracle8i:
>>
>> String driver="oracle.jdbc.driver.OracleDriver";
>> String url="jdbcracle:thin:@serverName:1521:dbName";
>> String username="myOracleUsername";
>> String password="myOraclePassword";
>>
>> (Setting: JDK1.4; Tomcat4)
>>
>> Now, if the db is upgraded to 10g, what do I expect in terms of jdbc
>> driver settings?

>
>
> You should also be careful if you intend on working with DATE columns...
> have a look at:
>
> http://www.oracle.com/technology/tec..._faq.htm#08_01
>
>
> ... which explains the situation nicely!


Yep. I went around and round with them over this. Oracle misinterpreted
the JDBC spec when they changed the mapping of their DATE column to a
java Date object. Their enforcing correspondence of these column type
*names* is petty and pointless. The names of columns bear no semantic
relation or specified tie to Java or JDBC types. Oracle should clearly
map both their DATE and TIMESTAMP columns to a java.sql.Timestamp because
the semantics of both those columns have that meaning. What if Oracle
invented a new decimal column that had higher precision than their current
NUMBER column? Would they feel compelled to change their mapping of NUMBER
to BIGINTEGER and lose all the sub-unit precision?
Joe Weinstein at BEA

 
Reply With Quote
 
Dimitri Maziuk
Guest
Posts: n/a
 
      05-13-2005
Joe Weinstein sez:
>

.... What if Oracle
> invented a new decimal column that had higher precision than their current
> NUMBER column? Would they feel compelled to change their mapping of NUMBER
> to BIGINTEGER and lose all the sub-unit precision?


They map to BIGINTEGER now? Last time I tried

switch( ResultSetMetaData.getColumnType( i ) ) {
case java.sql.Types.INTEGER : ...
case java.sql.Types.FLOAT : ...
}

I ended up with no numbers in the table -- they mapped everything
to NUMERIC.

Dima
--
Things seemed simpler before we kept computers. -- IX, Revelation
 
Reply With Quote
 
Joe Weinstein
Guest
Posts: n/a
 
      05-13-2005


Dimitri Maziuk wrote:

> Joe Weinstein sez:
>
> ... What if Oracle
>
>>invented a new decimal column that had higher precision than their current
>>NUMBER column? Would they feel compelled to change their mapping of NUMBER
>>to BIGINTEGER and lose all the sub-unit precision?

>
>
> They map to BIGINTEGER now? Last time I tried
>
> switch( ResultSetMetaData.getColumnType( i ) ) {
> case java.sql.Types.INTEGER : ...
> case java.sql.Types.FLOAT : ...
> }
>
> I ended up with no numbers in the table -- they mapped everything
> to NUMERIC.


Right, no they don't. That's the point. No matter how many column types they
have that semantically map to a given java.sql type, they should map them all
to that type. Both their DATE and new TIMESTAMP columns store the date and time,
so the driver should return a java.sql.Timestamp if I do a getObject() on either
column, but by default (by fault imo) the 10g driver returns a java.sql.Date
now for an oracle DATE column, so you lose the time component of your data!
Joe

>
> Dima


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
CLOB issue with JDBC, IBATIS and Oracle 10g kartechy@googlemail.com Java 1 09-21-2007 11:06 AM
Sequence.nextval numeric type in Oracle 10g differs from Oracle 8i when using MS OleDb provider alasdair.johnson@gmail.com ASP .Net 0 04-27-2007 04:57 PM
Access Oracle 10g using ASP.NET sloan ASP .Net 1 03-11-2006 06:48 AM
install_driver(Oracle) failed: Can't load 'C:/Perl/site/lib/auto/DBD/Oracle/Oracle.dll' for module DBD::Oracle: load_file:The specified procedure could not be found at C:/Perl/lib/DynaLoader.pm line 230. Feyruz Perl Misc 4 10-14-2005 06:47 PM
oracle.jdbc.OracleDriver vs oracle.jdbc.driver.OracleDriver Betty Java 1 05-21-2005 05:15 PM



Advertisments