1 Reply Latest reply on Sep 26, 2003 1:03 PM by riddler3479

    query question

    riddler3479 Newbie

      I am trying to create a query in java.

      I have used the following syntax to create queries:

      query = "SELECT * FROM TABLE WHERE VALUE = ?";

      PreparedStatement ps =
      conn.prepareStatement(query);

      ps.setString(1,someValue);

      This will not work on jboss. Instead, I have to change all of the queries to actually have the values in the query. Does anyone know why this occurs?

      query = "SELECT * FROM TABLE WHERE VALUE = '" + somValue + "'";

      Thanks!