Skip to content
Snippets Groups Projects
Commit 7ca2e9b3 authored by Jayaram Sreevalsan's avatar Jayaram Sreevalsan
Browse files

Bug fix. Prepared statement with generated keys

parent 45bcd637
No related branches found
No related tags found
No related merge requests found
...@@ -4333,8 +4333,8 @@ void addBlackBoardAttribute(BlackboardAttribute attr, int artifactTypeId, CaseDb ...@@ -4333,8 +4333,8 @@ void addBlackBoardAttribute(BlackboardAttribute attr, int artifactTypeId, CaseDb
} }
void addFileAttribute(Attribute attr, CaseDbConnection connection) throws SQLException, TskCoreException { void addFileAttribute(Attribute attr, CaseDbConnection connection) throws SQLException, TskCoreException {
PreparedStatement statement; PreparedStatement statement;
statement = connection.getPreparedStatement(PREPARED_STATEMENT.INSERT_FILE_ATTRIBUTE); statement = connection.getPreparedStatement(PREPARED_STATEMENT.INSERT_FILE_ATTRIBUTE, Statement.RETURN_GENERATED_KEYS);
statement.clearParameters(); statement.clearParameters();
   
statement.setLong(1, attr.getAttributeParentId()); statement.setLong(1, attr.getAttributeParentId());
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment