Java Database programming

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • baygan
    New Member
    • Feb 2007
    • 5

    Java Database programming

    Can u plz let me know how i should connect my program in java to store as well as retrieve records from ms access database???

    Tks..

    Ronald.
  • horace1
    Recognized Expert Top Contributor
    • Nov 2006
    • 1510

    #2
    Originally posted by baygan
    Can u plz let me know how i should connect my program in java to store as well as retrieve records from ms access database???

    Tks..

    Ronald.
    have a look at the Java JDBC tutorial
    http://java.sun.com/docs/books/tutorial/jdbc/

    Comment

    • r035198x
      MVP
      • Sep 2006
      • 13225

      #3
      Originally posted by baygan
      Can u plz let me know how i should connect my program in java to store as well as retrieve records from ms access database???

      Tks..

      Ronald.
      That's very easy to do. Just read the tutorial and practice on your computer.

      Comment

      • elsheh
        New Member
        • Nov 2006
        • 29

        #4
        here is how to do it:

        you need to find out what are URL and Driver you need.

        class DBCon {
        public static Connection getConnection() throws Exception {

        String Driver="XXXXXXX X";
        String URL="YYYYYYYYYY YYYYYYYY";
        Class.forName(D river);
        Connection c = DriverManager.g etConnection(UR L);


        return c;

        }
        }

        Comment

        • r035198x
          MVP
          • Sep 2006
          • 13225

          #5
          Originally posted by elsheh
          here is how to do it:

          you need to find out what are URL and Driver you need.

          class DBCon {
          public static Connection getConnection() throws Exception {

          String Driver="XXXXXXX X";
          String URL="YYYYYYYYYY YYYYYYYY";
          Class.forName(D river);
          Connection c = DriverManager.g etConnection(UR L);


          return c;

          }
          }
          Well, you forgot the code tags.

          Comment

          Working...