Browse Source

* OdbcDataReader.cs (GetValue): Use SQL_CHAR for Numeric as
temporary fix.


svn path=/trunk/mcs/; revision=51703

Sureshkumar T 20 years ago
parent
commit
bf9387cd52

+ 3 - 0
mcs/class/System.Data/System.Data.Odbc/ChangeLog

@@ -1,5 +1,8 @@
 2005-10-14  Sureshkumar T  <[email protected]>
 
+	* OdbcDataReader.cs (GetValue): Use SQL_CHAR for Numeric as
+	temporary fix.
+
 	* OdbcParameter.cs (CopyValue): Add support for Numeric & Decimal
 	parameters.
 

+ 3 - 2
mcs/class/System.Data/System.Data.Odbc/OdbcDataReader.cs

@@ -671,8 +671,9 @@ namespace System.Data.Odbc
 				case OdbcType.Numeric:
 				case OdbcType.Decimal:
 					bufsize=50;
-					buffer=new byte[bufsize];  // According to sqlext.h, use SQL_CHAR for decimal. 
-					ret=libodbc.SQLGetData(hstmt, ColIndex, col.SqlCType, buffer, bufsize, ref outsize);
+					buffer=new byte[bufsize];  // According to sqlext.h, use SQL_CHAR for decimal.
+					// FIXME : use Numeric.
+					ret=libodbc.SQLGetData(hstmt, ColIndex, SQL_C_TYPE.CHAR, buffer, bufsize, ref outsize);
 					if (outsize!=-1) {
 						byte[] temp = new byte[outsize];
 						for (int i=0;i<outsize;i++)