diff options
author | Veerapuram Varadhan <v.varadhan@gmail.com> | 2009-06-03 20:31:43 +0400 |
---|---|---|
committer | Veerapuram Varadhan <v.varadhan@gmail.com> | 2009-06-03 20:31:43 +0400 |
commit | 4dc9024c2d90fdb476c4425e52a7a0a9b49bdcc7 (patch) | |
tree | 146234477625a02cf24046886212e2a587cced8a /mcs | |
parent | 622db0d80945173bfba7e19e8d1dd0a4937b9584 (diff) |
2009-06-03 Veerapuram Varadhan <vvaradhan@novell.com>
* OracleParameter.cs: Infer the ocitype before inferring the size
svn path=/branches/mono-2-4/mcs/; revision=135312
Diffstat (limited to 'mcs')
3 files changed, 10 insertions, 5 deletions
diff --git a/mcs/class/System.Data.OracleClient/System.Data.OracleClient/ChangeLog b/mcs/class/System.Data.OracleClient/System.Data.OracleClient/ChangeLog index efadaefab6f..6296c646992 100644 --- a/mcs/class/System.Data.OracleClient/System.Data.OracleClient/ChangeLog +++ b/mcs/class/System.Data.OracleClient/System.Data.OracleClient/ChangeLog @@ -1,4 +1,8 @@ 2009-06-03 Veerapuram Varadhan <vvaradhan@novell.com> + + * OracleParameter.cs: Infer the ocitype before inferring the size + +2009-06-03 Veerapuram Varadhan <vvaradhan@novell.com> * OracleParameter.cs: If a non-zero size is passed, update the size member but sizeSet is updated only when a non-null diff --git a/mcs/class/System.Data.OracleClient/System.Data.OracleClient/OracleParameter.cs b/mcs/class/System.Data.OracleClient/System.Data.OracleClient/OracleParameter.cs index 55c607b014c..b876f4d6f0c 100644 --- a/mcs/class/System.Data.OracleClient/System.Data.OracleClient/OracleParameter.cs +++ b/mcs/class/System.Data.OracleClient/System.Data.OracleClient/OracleParameter.cs @@ -123,13 +123,15 @@ namespace System.Data.OracleClient { this.name = name; this.value = value; + InferOracleType (value); + srcColumn = string.Empty; + SourceVersion = DataRowVersion.Current; + + // Find the OciType before inferring for the size if (value != null && value != DBNull.Value) { this.sizeSet = true; this.size = InferSize (); } - srcColumn = string.Empty; - SourceVersion = DataRowVersion.Current; - InferOracleType (value); } public OracleParameter (string name, OracleType oracleType) diff --git a/mcs/class/System.Data.OracleClient/Test/System.Data.OracleClient/OracleParameterTest.cs b/mcs/class/System.Data.OracleClient/Test/System.Data.OracleClient/OracleParameterTest.cs index e6c755d8cc9..a4d357729ac 100644 --- a/mcs/class/System.Data.OracleClient/Test/System.Data.OracleClient/OracleParameterTest.cs +++ b/mcs/class/System.Data.OracleClient/Test/System.Data.OracleClient/OracleParameterTest.cs @@ -386,7 +386,7 @@ namespace MonoTests.System.Data.OracleClient "END;\n"; string insertValue = "INSERT INTO oratest VALUES " + - "(424608, \"This is a test for 424908 parameter size bug\", NULL);"; + "(424908, \"This is a test for 424908 parameter size bug\", NULL);"; using (command = conn.CreateCommand ()) { command.CommandText = createSP; @@ -457,7 +457,6 @@ namespace MonoTests.System.Data.OracleClient OracleParameter text = new OracleParameter ("text", OracleType.NVarChar, 64); text.Direction = ParameterDirection.Output; text.Value = string.Empty; - text.Size = 64; command.Parameters.Add (text); command.CommandType = CommandType.StoredProcedure; |