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's wrong with my code?

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

    Default what's wrong with my code?

    Hi ,

    I have writtten a code in netbeans to remove stop words.I stored tokenized words in one table(three fields) and stop words(one field) in another table.I created a new table named sremoval having three fields to store the output.I used ms access.
    But the query is not executing.pls help me.

    import java.sql.*;
    public class Main {

    public static void main(String[] args) {
    try
    {
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    String url = "jdbcdbcriver={Microsoft Access Driver " +
    "(*.mdb, *.accdb)};DBQ=E:\\Database1.accdb";
    Connection con = DriverManager.getConnection(url);
    System.out.println("Connected");
    Statement s=con.createStatement();
    String ttt = "insert into sremoval(d_id,ss_id,term) select document,s_id,word from tokenization where tokenization.word not in (select ww from stopwords)";

    s.executeUpdate(ttt);
    s.close();
    con.close();
    }
    catch(Exception ex)
    {
    ex.printStackTrace();
    }

    }

    }


  2. #2
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,162
    Thanks
    65
    Thanked 2,725 Times in 2,675 Posts

    Default Re: what's wrong with my code?

    the query is not executing
    Are you getting any errors? Please copy and paste the full text of any error messages here.
    If you don't understand my answer, don't ignore it, ask a question.

Similar Threads

  1. what is wrong with my code?
    By bmb in forum What's Wrong With My Code?
    Replies: 2
    Last Post: October 7th, 2011, 09:03 AM
  2. What is wrong with this code?
    By A19 in forum What's Wrong With My Code?
    Replies: 15
    Last Post: August 11th, 2011, 09:45 PM
  3. what's wrong with my code
    By gcsekhar in forum Java Networking
    Replies: 2
    Last Post: July 19th, 2011, 09:31 AM
  4. What is wrong with my code???
    By nine05 in forum What's Wrong With My Code?
    Replies: 4
    Last Post: February 8th, 2011, 09:59 AM
  5. What is wrong with my code?
    By phantom06 in forum What's Wrong With My Code?
    Replies: 4
    Last Post: February 3rd, 2011, 05:21 AM