Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4269900

JDBC 2.0 PreparedStatement: view resulting query (after substitutions made)

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Won't Fix
    • Icon: P4 P4
    • None
    • 1.2.1, 1.2.2
    • core-libs
    • generic
    • generic



      Name: krT82822 Date: 09/08/99


      When you have a PreparedStatement object, and you set all params ('?'), you want to know how the final statement looks like. This is the query that is executed against the database.

      i.e.

      PreparedStatement ps;
      ps=connection.PreparedStatement("INSERT INTO CUSTOMERS(F1,F2) VALUES(?,?)");
      ps.setString("SS",1);
      ps.setString("TT",2);

      ****

      I?d like to be able to get the query,
      query="INSERT INTO CUSTOMERS(F1,F2) VALUES('SS','TT')"
      (Review ID: 95020)
      ======================================================================

            jellissunw Jon Ellis (Inactive)
            kryansunw Kevin Ryan (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: