aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--odb/mssql/simple-object-statements.hxx1
-rw-r--r--odb/mssql/simple-object-statements.txx6
2 files changed, 6 insertions, 1 deletions
diff --git a/odb/mssql/simple-object-statements.hxx b/odb/mssql/simple-object-statements.hxx
index 77b1c34..c62684c 100644
--- a/odb/mssql/simple-object-statements.hxx
+++ b/odb/mssql/simple-object-statements.hxx
@@ -428,6 +428,7 @@ namespace odb
new (details::shared) delete_statement_type (
conn_,
object_traits::optimistic_erase_statement,
+ true, // Unique (0 or 1 affected rows).
od_.id_image_binding_,
false));
}
diff --git a/odb/mssql/simple-object-statements.txx b/odb/mssql/simple-object-statements.txx
index 6e3cf42..9dfe490 100644
--- a/odb/mssql/simple-object-statements.txx
+++ b/odb/mssql/simple-object-statements.txx
@@ -54,7 +54,11 @@ namespace odb
update_image_binding_ (update_image_bind_,
update_column_count + id_column_count +
managed_optimistic_column_count,
- object_traits::batch,
+ // No support for bulk update and ROWVERSION.
+ //
+ (object_traits::rowversion
+ ? 1
+ : object_traits::batch),
sizeof (images),
status_),
id_image_binding_ (update_image_bind_ + update_column_count,