Skip to Main Content

Java Development Tools

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

java.sql.sqlsyntaxerrorexception ora-00933 sql command not properly ended

3226374May 28 2016 — edited May 28 2016

please can someone help me to fix this error,

this is my method that have an sql query,i dont know why i have an error:java.sql.sqlsyntaxerrorexception ora-00933 sql command not properly ended

method:

public String privilegeCurrentAclUser() {    

  String userPrivileges =null;

      ResultSet resultSet = null;

      PreparedStatement createPreparedStatement =

        getDBTransaction().createPreparedStatement("" +

                                                 " select a.privilege from ACL__USER a where a.TUSER_ID="+CurrentUser().longValue()+"and a.DOCUMENT_ID="+getDocumentId()+")", 0);

      try {

        resultSet = createPreparedStatement.executeQuery();

        if (resultSet.next()) {

         userPrivileges = (String)resultSet.getObject(1);

         

        }

      } catch (SQLException e) {

        throw new JboException(e);

      }

      return userPrivileges;

  }

This post has been answered by SanjeevChauhan on May 28 2016
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 25 2016
Added on May 28 2016
2 comments
592 views