Author: suresh
Date: 2005-04-05 05:25:59 -0400 (Tue, 05 Apr 2005)
New Revision: 42553
Modified:
trunk/mcs/class/System.Data/System.Data.Odbc/ChangeLog
trunk/mcs/class/System.Data/System.Data.Odbc/OdbcParameter.cs
trunk/mcs/class/System.Data/System.Data.Odbc/libodbc.cs
Log:
2005-04-05 Sureshkumar T <[EMAIL PROTECTED]>
* OdbcParameter.cs: SqlBindParameter requires the last parameter
to be a ref.
* libodbc.cs: API change for above.
Modified: trunk/mcs/class/System.Data/System.Data.Odbc/ChangeLog
===================================================================
--- trunk/mcs/class/System.Data/System.Data.Odbc/ChangeLog 2005-04-05
08:51:54 UTC (rev 42552)
+++ trunk/mcs/class/System.Data/System.Data.Odbc/ChangeLog 2005-04-05
09:25:59 UTC (rev 42553)
@@ -1,3 +1,9 @@
+2005-04-05 Sureshkumar T <[EMAIL PROTECTED]>
+
+ * OdbcParameter.cs: SqlBindParameter requires the last parameter
+ to be a ref.
+ * libodbc.cs: API change for above.
+
2005-04-04 Sureshkumar T <[EMAIL PROTECTED]>
* OdbcDataReader.cs: Ignore BaseTableName & BaseColumnName
Modified: trunk/mcs/class/System.Data/System.Data.Odbc/OdbcParameter.cs
===================================================================
--- trunk/mcs/class/System.Data/System.Data.Odbc/OdbcParameter.cs
2005-04-05 08:51:54 UTC (rev 42552)
+++ trunk/mcs/class/System.Data/System.Data.Odbc/OdbcParameter.cs
2005-04-05 09:25:59 UTC (rev 42553)
@@ -292,16 +292,15 @@
SQL_TYPE sqltype =
OdbcTypeConverter.ConvertToSqlType (odbcType);
// Bind parameter based on type
+ int ind = -3;
if (odbcType == OdbcType.Int)
ret = libodbc.SQLBindParameter(hstmt,
(ushort)ParamNum, (short)paramdir,
ctype, sqltype,
Convert.ToUInt32(Size),
- 0, ref intbuf,
0, 0);
+ 0, ref intbuf,
0, ref ind);
else
ret = libodbc.SQLBindParameter(hstmt,
(ushort)ParamNum, (short)paramdir,
ctype, sqltype,
Convert.ToUInt32(Size),
- 0, buffer, 0,
0);
-
-
+ 0, buffer,
buffer.Length, ref ind);
// Check for error condition
if ((ret != OdbcReturn.Success) && (ret !=
OdbcReturn.SuccessWithInfo))
throw new OdbcException(new
OdbcError("SQLBindParam", OdbcHandleType.Stmt, hstmt));
Modified: trunk/mcs/class/System.Data/System.Data.Odbc/libodbc.cs
===================================================================
--- trunk/mcs/class/System.Data/System.Data.Odbc/libodbc.cs 2005-04-05
08:51:54 UTC (rev 42552)
+++ trunk/mcs/class/System.Data/System.Data.Odbc/libodbc.cs 2005-04-05
09:25:59 UTC (rev 42553)
@@ -239,12 +239,12 @@
[DllImport("odbc32.dll")]
internal static extern OdbcReturn SQLBindParameter(IntPtr
StatementHandle, ushort ParamNum,
short InputOutputType, SQL_C_TYPE ValueType,
SQL_TYPE ParamType, uint ColSize,
- short DecimalDigits, byte[] ParamValue, int
BufLen, int StrLen);
+ short DecimalDigits, byte[] ParamValue, int
BufLen, ref int StrLen);
[DllImport("odbc32.dll")]
internal static extern OdbcReturn SQLBindParameter(IntPtr
StatementHandle, ushort ParamNum,
short InputOutputType, SQL_C_TYPE ValueType,
SQL_TYPE ParamType, uint ColSize,
- short DecimalDigits, ref int ParamValue, int
BufLen, int StrLen);
+ short DecimalDigits, ref int ParamValue, int
BufLen, ref int StrLen);
[DllImport("odbc32.dll")]
internal static extern OdbcReturn SQLCancel(IntPtr
StatementHandle);
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches