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: JavaSQLException - ORA-00933: command not properly ended

  1. #1
    Junior Member
    Join Date
    Nov 2013
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default JavaSQLException - ORA-00933: command not properly ended

    Hello to everyone. I am beginner in Java programming. I confront an incomprehensible problem with an insert statement in Java. I try to develop Java GUI Applications and stuck.

    I try to find out "what is going wrong" but without result. When i execute the method below, it throws the following exception:

    ORA-00933: command not properly ended

    Why it throws this exception. It shows to be absolutely correct; Thanks in advance.

    Source methods's code:

    public void insertMemberAction() {

    try (PreparedStatement ps = con.prepareStatement(
    "insert into members values(?, ?, ?, ?, ?)")) {
    ps.setString(1, jMnoTxt.getText());
    ps.setString(2, jLastnameTxt.getText());
    ps.setString(3, jFirstnameTxt.getText());
    ps.setString(4, jAddressTxt.getText());
    ps.setString(5, jRegistrationDateTxt.getText());
    ps.executeUpdate();

    } catch (java.sql.SQLException e) {
    javax.swing.JOptionPane.showMessageDialog(this, e.getMessage());

    }
    }


  2. #2

    Default Re: JavaSQLException - ORA-00933: command not properly ended

    I don't see anything wrong with you code. So I guess the inputs may bring something wrong. Pay attention to that. Try to print out the final SQL statement to detect where the problem is.

Similar Threads

  1. [SOLVED] Is this coded properly?
    By The_pizzaguy in forum What's Wrong With My Code?
    Replies: 2
    Last Post: November 16th, 2013, 01:28 AM
  2. [SOLVED] System exit command is not working properly
    By LRWalton in forum What's Wrong With My Code?
    Replies: 1
    Last Post: March 21st, 2012, 06:27 PM
  3. Creating an open-ended class that can be extended:
    By dedshaw1612 in forum Object Oriented Programming
    Replies: 2
    Last Post: March 9th, 2012, 09:34 AM
  4. not looping properly, please help.
    By nakedtriple in forum What's Wrong With My Code?
    Replies: 9
    Last Post: October 28th, 2011, 08:31 AM
  5. Java Child process cannot execute properly for telnet command
    By mamunbu in forum What's Wrong With My Code?
    Replies: 1
    Last Post: July 25th, 2011, 07:43 AM

Tags for this Thread