Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 2 of 2

Thread: what wrong with in my progtam?

  1. #1
    Junior Member
    Join Date
    Aug 2012
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Angry what wrong with in my progtam?

    package jj;


    import java.sql.*;
    import java.lang.*;
    public class Student{
    static Statement st;
    static ResultSet rs;
    static Connection n;

    public static void main(String args[]){
    try{

    System.out.println("Drever..");
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    System.out.println("Hey driver is intall readly");

    }catch(ClassNotFoundException e){
    System.out.println("No class");
    }
    try{
    System.out.println("Connection");
    n=DriverManager.getConnection("jdbcdbc:Addressbook");
    System.out.println("Connection ok");


    st=n.createStatement(rs.TYPE_SCROLL_SENSITIVE,rs.C ONCUR_READ_ONLY);
    rs=st.executeQuery("select* from Addressbook");
    rs.beforeFirst();
    while(rs.next()){
    System.out.println(rs.getString(1)+'\t'+'\t');
    System.out.println(rs.getString(2)+'\t'+'\t');
    System.out.println(rs.getString(3)+'\t'+'\t');
    System.out.println(rs.getString(4)+'\t'+'\t');


    }
    st.close();
    rs.close();
    n.close();

    }catch(SQLException ex){
    System.err.println("Sql error"+ex.getMessage());
    }
    }

    }

    ႈIt cannot put data to access database .And show this error message " Sql error[Microsoft][ODBC Microsoft Access Driver] The Microsoft Office Access database engine cannot find the input table or query 'Addressbook'. Make sure it exists and that its name is spelled correctly." Why?? Please help me


  2. #2
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    SW Missouri
    Posts
    20,149
    Thanks
    48
    Thanked 2,158 Times in 2,131 Posts

    Default Re: what wrong with in my progtam?

    Have you done this:
    Make sure it exists and that its name is spelled correctly
    If you don't understand my answer, don't ignore it, ask a question.

Similar Threads

  1. What did I do wrong here?
    By Paetilium in forum What's Wrong With My Code?
    Replies: 1
    Last Post: March 19th, 2012, 11:13 PM
  2. [SOLVED] where I'm wrong?
    By arvindbis in forum What's Wrong With My Code?
    Replies: 4
    Last Post: March 7th, 2012, 08:12 AM
  3. Idk what is wrong
    By Devourz in forum What's Wrong With My Code?
    Replies: 1
    Last Post: October 28th, 2011, 05:05 AM
  4. [SOLVED] Help me to fix the bug?
    By arvindbis in forum JDBC & Databases
    Replies: 4
    Last Post: October 14th, 2011, 04:13 AM
  5. WHAT IS WRONG HERE PLEASE?
    By mjava in forum What's Wrong With My Code?
    Replies: 3
    Last Post: August 27th, 2010, 08:29 PM