• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

is db2 by default 'servicing' jdbc 1? or 2?

 
Ranch Hand
Posts: 2107
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
is db2, by default, recognizes jdbc 1? if yes, how do i make it recognize jdbc 2?
 
Ranch Hand
Posts: 1879
MySQL Database Suse
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jesus,

There is no "Default" when it comes to database drivers. It uses whichever driver you have told it to use ( The whole Class.forName or DriverManager.registerDriver() part in your code ). So, if you want to be sure, download the latest jdbc drivers available for your version of DB2, then you'll know that you are not using a legacy/out-dated driver.

**NOTE**- If your java code is running on the AS/400 ( native OS for DB2 ), there are property settings telling the AS/400 what jdk it is supposed to use. That is the only restriction that I can see related to your question.

If you are having a specific problem, post the exception and a code snippet along with an explanation of the program behaviour.

Jamie

Jamie
 
author & internet detective
Posts: 40211
816
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jesus,
You need to run the batch file called java12.bat or usejava12.bat (I forget which.) Make sure to shut down the db2 services first.
 
Jesus Angeles
Ranch Hand
Posts: 2107
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks for your replies.

jeanne, that is what i wanted to do as instructed, in an old book i am reading - that book referring to an older version of db2.

but with this 8.1 version, i cant find any .bat file in the entire installed folder, that is named like that.

that is why i am not sure
 
Jeanne Boyarsky
author & internet detective
Posts: 40211
816
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jesus,
In db2 7 (which I use), it is in DB2_INSTALL_DIR/sqllib/java12/usejdbc2.bat. According to google, it is in DB2_INSTALL_DIR/java12/usejdbc2 in db2 8.
 
Jesus Angeles
Ranch Hand
Posts: 2107
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
jeanne, for 8.1 there is no directory like taht on my folder...what keyword did u use at google to look for it?....thanks
 
Jesus Angeles
Ranch Hand
Posts: 2107
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
jeanne, i found the answer, i think, ill post it tomorrow, as im rushing.....answer is , for 8.1 and higher, no need to do usejdbcxx
 
Jeanne Boyarsky
author & internet detective
Posts: 40211
816
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jesus,
Good to know. Thanks for posting the answer.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic