Results 1 to 5 of 5
  1. #1
    Manfizy's Avatar
    Manfizy is offline Senior Member
    Join Date
    Nov 2008
    Location
    Germany
    Posts
    193
    Rep Power
    6

    Post how to connect java to MS Access database

    Hi guyz,
    i wanna know how to connect java to ms access database
    cheers!!
    We Learn Through Mistakes..,
    Manfizy:rolleyes:

  2. #2
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,526
    Blog Entries
    7
    Rep Power
    20

    Default

    I don't know anything about MS Access but if it comes with an ODBC interface implementation you can use the bundled JDBC-ODBC bridge (a JDBC driver that translates calls to the ODBC interface). For starters read: this link.

    kind regards,

    Jos

  3. #3
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    12,014
    Rep Power
    20

  4. #4
    mindblaster's Avatar
    mindblaster is offline Member
    Join Date
    Dec 2009
    Location
    Pakistan
    Posts
    18
    Rep Power
    0

    Default

    thanks for help...
    Any fool can write code that a computer can understand. Good programmers write code that humans can understand.

  5. #5
    raqman is offline Member
    Join Date
    Sep 2009
    Posts
    37
    Rep Power
    0

    Default

    to connect ms access with java
    you have to datasource name

    and write this code in ur program

    Connection con=null;
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    con=DriverManager.getConnection("jdbc:odbcSN name");
    Statement stmt=con.createStatment();
    ResultSet rs=stmt.executeQuery("select * from tablename");
    while(rs.next())
    {
    System.out.println(rs.getSting("username"); //here username is the field name
    }
    RAQ Report: free Java reporting tool.

Similar Threads

  1. java with access database
    By ashin in forum SWT / JFace
    Replies: 4
    Last Post: 07-12-2009, 05:04 PM
  2. Connect to Access without MS ODBC?
    By ribbs2521 in forum New To Java
    Replies: 5
    Last Post: 04-16-2009, 03:33 AM
  3. how to fetch 20,000 records from excel sheet & insert into access database using Java
    By santosh_tamse in forum JavaServer Pages (JSP) and JSTL
    Replies: 0
    Last Post: 02-22-2009, 10:24 AM
  4. Replies: 3
    Last Post: 09-18-2008, 03:07 PM
  5. Replies: 2
    Last Post: 06-12-2008, 07:09 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •