Results 1 to 1 of 1
- 12-22-2011, 12:51 PM #1
Member
- Join Date
- Dec 2011
- Posts
- 1
- Rep Power
- 0
MS Access to Java Connection Problems
Hi, I have a problem with connections ms access to java. I have a code like ;
import java.sql.*;
class Test
{
public static void main(String[] args)
{
try {
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
// set this to a MS Access DB you have on your machine
String filename = "C:/Users/SERVER/Desktop/Law Sistem/Database1.mdb";
String database = "jdbc:odbc:Driver={Microsoft Access Driver (*.mdb)};DBQ=";
database+= filename.trim() + ";DriverID=22;READONLY=true}"; // add on to the end
// now we can get the connection from the DriverManager
Connection con = DriverManager.getConnection( database ,"","");
}
catch (Exception e) {
System.out.println("Error: " + e);
}
}
}
And I take the problem like ;
Error: java.sql.SQLException: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
I tried to download easysoft bridge and i can't again fix that ?
How can I do that ?
Similar Threads
-
Access connection error
By jasonwucinski in forum JDBCReplies: 15Last Post: 04-21-2011, 09:00 AM -
Connection to DLL using Java Native Access
By cowboy in forum New To JavaReplies: 1Last Post: 01-23-2010, 08:43 PM -
Accessing MS Access using DSN less connection
By Java Tip in forum Java TipReplies: 1Last Post: 03-31-2009, 05:25 PM -
connection between ms access and jcreator
By tiger100plus in forum New To JavaReplies: 0Last Post: 11-24-2008, 03:34 PM -
using Java to access a secure webpage, Exception occurred: Connection timed out
By toby in forum Enterprise JavaBeans (EJB)Replies: 1Last Post: 08-07-2007, 06:03 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks