• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

JDBC DB2 Type 4

 
Ranch Hand
Posts: 67
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I want to know about JDBC DB2 Type 4 driver.

I am written a test JSP. Can you please tell me if it confirms to Type 4 specification?

<BODY>
<%try {
Class.forName("com.ibm.db2.jcc.DB2Driver");
String url= "jdbc:db2://MYDB.domain.com:446/MYDB";
%>

<% java.sql.Connection connection = java.sql.DriverManager.getConnection(url,"myuser","mypass");%>

<%
connection.close();
} catch (Exception e) {
%>
Error : <%=e%>
<%
}
%>
</BODY>


Can some one please help me make sure that this is Type 4? What are the requirements and conditions for Type 4?

Thanks
 
Sheriff
Posts: 9109
12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It looks fine to me.

Originally posted by Scott Selikoff:
With the risk of being flamed, I find Wikipedia has a decent discussion of the driver levels: http://en.wikipedia.org/wiki/JDBC_type_3_driver

I tend to not worry about the level unless there's a problem with a specific driver. All and all I think the only database it mattered was with oracle and the performance differences were almost non-existent.


[ March 22, 2007: Message edited by: Marilyn de Queiroz ]
 
Ratan Kumar
Ranch Hand
Posts: 67
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

Thanks for your response.

I googled for this.I believe the following lines confirm that I am using Type 4

Class.forName("com.ibm.db2.jcc.DB2Driver");
String url= "jdbc:db2://MYDB.domain.com:446/MYDB";

Thanks again
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic