import java.sql.*;
public class dbConnection {
dbConnection(){
connect();
}
public void connect(){
try{
Class.forName("jdbc.odbc.JdbcOdbcDriver");
Connection con = DriverManager.getConnection("jdbc:odbc:Database1","","");
System.out.println("Connected!");
}
catch(Exception e){
System.out.println("Error");
}
}
public static void main(String[]args){
new dbConnection();
}
}
access to database connection not working
Page 1 of 13 Replies - 2723 Views - Last Post: 18 October 2012 - 10:54 PM
#1
access to database connection not working
Posted 16 October 2012 - 06:13 AM
Hey guys, I am trying to make a simple connection to the a access database(MS Access 2010), but for some reason I am not able to connect to it. I have installed the driver already and this is the sample code. Any help will be highly appreciated.
Replies To: access to database connection not working
#2
Re: access to database connection not working
Posted 16 October 2012 - 06:49 AM
..moving to the access DB subforum.
#3
Re: access to database connection not working
Posted 16 October 2012 - 07:11 AM
#4
Re: access to database connection not working
Posted 18 October 2012 - 10:54 PM
That is not VBA code you show. What is it? In what application?
Page 1 of 1
|
|

New Topic/Question
Reply


MultiQuote








|