Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problem in accessing data from DB2 v9

 
Abhishek Purwar
Ranch Hand
Posts: 63
Eclipse IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello friends..
I had encountered a problem in establishing connection between DB2v9 and web application page(using servlet,beans and jsp)........
I mention :

Class.forName("com.ibm.db2.jcc.DB2Driver);
Connection con=DriverManager.getConnection("jdbc:db2://localhost/airlines", "<system loginid>","<system password>");


Whether the above method of establishing connection is correct or not.....do tell me....
And shall we use same methods as with other database such as MYSQL for retrieving data ........
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"@bhishek Purwar ",
Please check your private messages.
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic