提交 1012ab0b 编写于 作者: V Veerapuram Varadhan

Fixes 667236 - Handle numeric types appropriately

上级 d8520bf7
2010-01-30 Veerapuram Varadhan <vvaradhan@novell.com>
** Fixes #667236 - Based on patch by Kalyanov.Dmitry@gmail.com
* OracleParameter.cs (GetOutValue): Handle OciDataType.Integer
appropriately using the underlying dbType.
2009-10-29 Veerapuram Varadhan <vvaradhan@novell.com>
** Fixes #322695
......
//
//
// OracleParameter.cs
//
// Part of the Mono class libraries at
......@@ -1305,8 +1305,25 @@ namespace System.Data.OracleClient
OciCalls.OCICharSetToUnicode (env, ret, bytes, out rsize);
// if not empty, parse string as a decimal using session format
if (ret.Length > 0)
value = Decimal.Parse (ret.ToString (), cmd.Connection.SessionFormatProvider);
if (ret.Length > 0) {
switch (dbType) {
case DbType.UInt16:
value = UInt16.Parse (ret.ToString (), cmd.Connection.SessionFormatProvider);
break;
case DbType.UInt32:
value = UInt32.Parse (ret.ToString (), cmd.Connection.SessionFormatProvider);
break;
case DbType.Int16:
value = Int16.Parse (ret.ToString (), cmd.Connection.SessionFormatProvider);
break;
case DbType.Int32:
value = Int32.Parse (ret.ToString (), cmd.Connection.SessionFormatProvider);
break;
default:
value = Decimal.Parse (ret.ToString (), cmd.Connection.SessionFormatProvider);
break;
}
}
break;
case OciDataType.TimeStamp:
value = dateTimeDesc.GetDateTime (connection.Environment, dateTimeDesc.ErrorHandle);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册