Results 1 to 5 of 5
  1. #1
    ashin is offline Member
    Join Date
    Nov 2008
    Posts
    71
    Rep Power
    0

    Unhappy java with access database

    hi guys,
    pls help me to connect to my database using access this is my syntax but..

    import java.sql.*;

    public class ptime_database {

    Class.forName(DriverImplementationClass);

    String url = "jdbc:odbc:POS";
    String user="ashin";
    String password ="ashin";

    Connection connection = DriverManager.getConnection(url,user,password);

    }

    my error is the dot (.) before forName and the DriverImplementationClass...
    what will i do so that i can connect to my database....

    and am i right that i put my database in the same folder where my java class also located?
    tnx.. i need ur answer asap..
    :cool:

  2. #2
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    20

    Default

    Quote Originally Posted by ashin View Post
    Class.forName(DriverImplementationClass);
    Okay, what you going to do with this?

  3. #3
    mtyoung is offline Senior Member
    Join Date
    Dec 2008
    Location
    Hong Kong
    Posts
    473
    Rep Power
    6

    Default

    DriverImplementationClass???

    there should be something like "sun.jdbc.odbc.JdbcOdbcDriver"

  4. #4
    ashin is offline Member
    Join Date
    Nov 2008
    Posts
    71
    Rep Power
    0

    Default

    i think there is no error anymore, no red marks... but now, my problem is adding info in the database... im using eclipse.... sorry im new in SWt... esp JAVA and ACCESS...
    :cool:

  5. #5
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    20

    Default

    Adding data in the DB, nothing to do with the IDE. Something wrong in your data inserting code. Can you show what you have tried and explain what's the exact problem you have with the data adding in the DB?

Similar Threads

  1. 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
  2. Replies: 2
    Last Post: 02-11-2009, 04:43 AM
  3. How to access MySQL Database in Eclipse 3.2
    By nijava in forum Eclipse
    Replies: 2
    Last Post: 12-12-2008, 03:04 PM
  4. Database access
    By Doctor Cactus in forum New To Java
    Replies: 1
    Last Post: 12-12-2008, 01:30 PM
  5. Replies: 1
    Last Post: 08-07-2007, 07:51 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
  •