title: Can any one help me java.sql.SQLException: ORA-00936: missing expression
body: <pre><code>package controller;
  
  import pojo.*;
  import java.sql.Connection;
  import java.sql.DriverManager;
  import java.sql.ResultSet;
  import java.sql.SQLException;
  import java.sql.Statement;
  
  
  
  
  public class JdbcConn {
      int found=0;
      public boolean register(Member c)
      {
          Connection conn=null;
          Statement stmt =null;
          ResultSet rs = null;
          try
          {
              Class.forName("oracle.jdbc.driver.OracleDriver");
              conn= DriverManager.getConnection("jdbc:oracle:thin:@localhost","system","system");
              stmt=conn.createStatement();
              System.out.println("Data base is connected");
              rs= stmt.executeQuery("select USERID from member");
              System.out.println("Hi");
              while(rs.next())
              {
                  System.out.println("bye");
                  if((c.getUserId()).equals(rs.getString(1)) )
                  {
                      System.out.println("bye");
                      found=1;
                      break;
                  }
              }
  
              if(found==1)
              {
                  return false;
              }
              else
                  stmt.executeUpdate("insert into member values ('"+ c.getName() +"','"+c.getEmail()+ "','"+c.getMobileNo()+ "','"+c.getAddress1()+"',,'"+c.getAddress2()+"','"+c.getUserId()+"','"+c.getPassword()+"','"+c.getSecretQuestion()+"','"+c.getSecretAnswer()+"')");
  
                  return true;
          }
          catch(ClassNotFoundException e)
          {
              System.out.print(e);
              e.printStackTrace();
          }
          catch(SQLException e)
          {
              System.out.print(e);
          }
          return false;
      }
  
  
  
  
      public boolean login(String userid, String password)
      {
          Connection conn=null;
          Statement stmt =null;
          ResultSet rs = null;    
          try
          {
              Class.forName("oracle.jdbc.driver.OracleDriver");
              conn = DriverManager.getConnection("jdbc:oracle:thin:@localhost","system","system");
              stmt=conn.createStatement();
  
              rs= stmt.executeQuery("select userid, password from member where userid = '"+userid+"'");
              if(rs==null)
              {
                  return false;
              }   
  
              else
              {
                  while(rs.next())
                  {
                      String uid,pass;
                      uid=rs.getString(1);
                      pass=rs.getString(2);
                      if(password.equals(pass))
                      {
                          return true;
                      }
                      else
                      {
                          return false;
                      }
                  }
              }
  
          }
          catch(ClassNotFoundException e)
          {
              System.out.print(e);
          }
          catch(SQLException e)
          {
              System.out.print(e);
          }
          return false;
      }
  
  }
  </code></pre>
  
  <p>I am invoking the code from one servlet. It is showing me the following output.Though the same code is working correctly in somewhere else:</p>
  
  <p>Output:</p>
  
  <pre><code>Data base is connected
  Hi
  java.sql.SQLException: ORA-00936: missing expression
  </code></pre>
  
  <p>Can anyone help me with the problem.</p>