Re: [Mono-dev] System.Data.OracleClient.OracleParameter.SetOracleType() bug?

2011-10-02 Thread Stefano Canepa
On Sat, Oct 01, 2011 at 03:31:46AM -0700, iamwind wrote: Tom Spink wrote: Well, without any other context, I'd do this: /// if (value == null) valType = typeof(System.DBNull); else valType = value.GetType(); /// Which means for a 'null value', the 'value type' would

Re: [Mono-dev] System.Data.OracleClient.OracleParameter.SetOracleType() bug?

2011-10-01 Thread Tom Spink
On 29 September 2011 14:53, iamwind iamwin...@hotmail.com wrote: snip Would you modify the code like following? Type valType = typeof(System.String); if(value != null) { valType = value.GetType ();

Re: [Mono-dev] System.Data.OracleClient.OracleParameter.SetOracleType() bug?

2011-10-01 Thread iamwind
Tom Spink wrote: Well, without any other context, I'd do this: /// if (value == null) valType = typeof(System.DBNull); else valType = value.GetType(); /// Which means for a 'null value', the 'value type' would be DBNull. Hope this helps, -- Tom Spink That's better!

[Mono-dev] System.Data.OracleClient.OracleParameter.SetOracleType() bug?

2011-09-29 Thread iamwind
the source code: private void SetOracleType (OracleType type, bool inferring) { FreeHandle (); Type valType = value.GetType (); string exception =