diff options
-rw-r--r-- | project2/sqlMergeTask.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/project2/sqlMergeTask.cpp b/project2/sqlMergeTask.cpp index 318ab4f..3abf4ee 100644 --- a/project2/sqlMergeTask.cpp +++ b/project2/sqlMergeTask.cpp @@ -216,7 +216,12 @@ class _Populate : public _NoOutputExecute { } unsigned int cols = iter->columnCount(); for (unsigned int c = 0; c < cols; c += 1) { - cmd->bindParamS(idxs[c], iter->getCurrentValue(c)); + try { + cmd->bindParamS(idxs[c], iter->getCurrentValue(c)); + } + catch (const PerRowValues::FieldDoesNotExist &) { + cmd->bindNull(idxs[c]); + } } cmd->execute(); } |