From 6f667d25040506c22645ffb107f0173da21983e6 Mon Sep 17 00:00:00 2001 From: Sunil Patel Date: Tue, 2 Aug 2011 17:06:07 +0530 Subject: [PATCH 1/2] This was ignoring size set for output parameter and always set to 50 the default value. This cause problem for output parameter of type string. --- SubSonic.Core/Query/QueryCommand.cs | 3 --- 1 file changed, 3 deletions(-) diff --git a/SubSonic.Core/Query/QueryCommand.cs b/SubSonic.Core/Query/QueryCommand.cs index 1d5d977..a0e4cfa 100644 --- a/SubSonic.Core/Query/QueryCommand.cs +++ b/SubSonic.Core/Query/QueryCommand.cs @@ -268,9 +268,6 @@ private void AddParameter(string parameterName, object parameterValue, int maxSi DataType = dbType }; - if(maxSize > -1 && direction != ParameterDirection.Output) - param.Size = maxSize; - parameters.Add(param); } From 07102aa67e2f71d570e1313a8a563a9445016b6f Mon Sep 17 00:00:00 2001 From: Sunil Patel Date: Tue, 2 Aug 2011 17:15:10 +0530 Subject: [PATCH 2/2] This was ignoring size set for output parameter and always set to 50 the default value. This cause problem for output parameter of type string. --- SubSonic.Core/Query/QueryCommand.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/SubSonic.Core/Query/QueryCommand.cs b/SubSonic.Core/Query/QueryCommand.cs index a0e4cfa..ee2f1ed 100644 --- a/SubSonic.Core/Query/QueryCommand.cs +++ b/SubSonic.Core/Query/QueryCommand.cs @@ -268,6 +268,9 @@ private void AddParameter(string parameterName, object parameterValue, int maxSi DataType = dbType }; + if(maxSize > -1 ) + param.Size = maxSize; + parameters.Add(param); }