Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

java database connectivity...

 
sanju gajera
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi!!! this is sanjay gajera
i want to know that how to connect the java applicaation to the database ....Access...please tell me this solution with exampale of small database ACCESS based application...as soon as possible.....
thanks....
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65225
95
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please read this.
 
Milankumar Desai
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
public void getConnection() {
try {
java.sql.Connection con = null;

Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
System.out.println("sun.jdbc.odbc.JdbcOdbcDriver found");
con = DriverManager.getConnection("jdbcdbc:CtsEmployee", "", "");
} catch (Exception cnfe) {
System.out.println("Error: sun.jdbc.odbc.JdbcOdbcDriver not found");
}
}

This is some snippet of code for access connection where CtsEmployee is some dataourse
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic