Project

General

Profile

« Previous | Next » 

Revision 92

Added by bojilova about 24 years ago

made changes about document doctypes

View differences:

DBSAXNode.java
74 74
    }
75 75

  
76 76
    /** creates SQL code and inserts comment into DB connection */
77
    void writeCommentToDB(String data) {
77
    void writeCommentToDB(String data, int nodeIndex) {
78 78
        try {
79 79
          PreparedStatement pstmt;
80 80
          pstmt = conn.prepareStatement(
81 81
                "INSERT INTO xml_nodes (nodeid, nodetype, " +
82
                "nodename, parentnodeid, nodedata) VALUES (null, ?, null, ?, ?)");
82
                "nodename, parentnodeid, nodedata, nodeindex) VALUES (null, ?, null, ?, ?, ?)");
83 83

  
84 84
          // Bind the values to the query
85 85
          pstmt.setString(1, "COMMENT");
86 86
          pstmt.setLong(2, getElementID());
87 87
          pstmt.setString(3, data);
88
          pstmt.setInt(4, nodeIndex);
88 89
          // Do the insertion
89 90
          pstmt.execute();
90 91
          pstmt.close();

Also available in: Unified diff