aboutsummaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2012-01-12 14:18:37 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2012-01-20 15:45:46 +0200
commit386162fc49b1adb266bbabc735ab28f46b98fa45 (patch)
treeb83b36703bffa7c41f444ac6cc6d84d23b285d33 /common
parent043d8fabcf15918e22efdbde41af4880b23c0104 (diff)
Disable re-loading of object with long data for SQL Server
Diffstat (limited to 'common')
-rw-r--r--common/query/driver.cxx7
1 files changed, 7 insertions, 0 deletions
diff --git a/common/query/driver.cxx b/common/query/driver.cxx
index 6dd7757..ee5a76c 100644
--- a/common/query/driver.cxx
+++ b/common/query/driver.cxx
@@ -421,8 +421,15 @@ main (int argc, char* argv[])
assert (i != r.end ());
++i;
assert (i != r.end ());
+
auto_ptr<person> joe (db->load<person> (3));
+
+ // SQL Server does not support re-loading of an object with long data
+ // from a query result.
+ //
+#ifndef DATABASE_MSSQL
assert (i->last_name_ == "Doe"); // Actual load.
+#endif
person p;
joe.reset (db->load<person> (3)); // Overwrite object image again.