From 11ac8ff454f780a825a09007e36dd566b1776a5e Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Thu, 12 Jan 2012 14:20:58 +0200 Subject: Change short data max and default string sizes for SQL Server Now the default short data max is 1024, non-key string size is 512 characters, and key string size is 256 characters. Also add default mapping for std::wstring. --- odb/mssql/query.hxx | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'odb/mssql/query.hxx') diff --git a/odb/mssql/query.hxx b/odb/mssql/query.hxx index 94faceb..4cfb802 100644 --- a/odb/mssql/query.hxx +++ b/odb/mssql/query.hxx @@ -1590,15 +1590,15 @@ namespace odb { query_param_impl (ref_bind r) : query_param (&r.ref), - // Default to short data max (700). - buf_ (r.prec != 0 ? r.prec : 700) + // Default to short data max (1024). + buf_ (r.prec != 0 ? r.prec : 1024) { } query_param_impl (val_bind v) : query_param (0), - // Default to short data max (700). - buf_ (v.prec != 0 ? v.prec : 700) + // Default to short data max (1024). + buf_ (v.prec != 0 ? v.prec : 1024) { init (v.val); } @@ -1644,15 +1644,15 @@ namespace odb { query_param_impl (ref_bind r) : query_param (&r.ref), - // Precision is in 2-byte chars. Default to short data max (700). - buf_ (r.prec != 0 ? r.prec * 2 : 700) + // Precision is in 2-byte chars. Default to short data max (1024). + buf_ (r.prec != 0 ? r.prec * 2 : 1024) { } query_param_impl (val_bind v) : query_param (0), - // Precision is in 2-byte chars. Default to short data max (700). - buf_ (v.prec != 0 ? v.prec * 2 : 700) + // Precision is in 2-byte chars. Default to short data max (1024). + buf_ (v.prec != 0 ? v.prec * 2 : 1024) { init (v.val); } @@ -1702,15 +1702,15 @@ namespace odb { query_param_impl (ref_bind r) : query_param (&r.ref), - // Default to short data max (700). - buf_ (r.prec != 0 ? r.prec : 700) + // Default to short data max (1024). + buf_ (r.prec != 0 ? r.prec : 1024) { } query_param_impl (val_bind v) : query_param (0), - // Default to short data max (700). - buf_ (v.prec != 0 ? v.prec : 700) + // Default to short data max (1024). + buf_ (v.prec != 0 ? v.prec : 1024) { init (v.val); } -- cgit v1.1