+2005-04-05 Sureshkumar T <tsureshkumar@novell.com>
+
+ * OdbcParameter.cs: SqlBindParameter requires the last parameter
+ to be a ref.
+ * libodbc.cs: API change for above.
+
2005-04-04 Sureshkumar T <tsureshkumar@novell.com>
* OdbcDataReader.cs: Ignore BaseTableName & BaseColumnName
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\r
if ((ret != OdbcReturn.Success) && (ret != OdbcReturn.SuccessWithInfo))\r
throw new OdbcException(new OdbcError("SQLBindParam", OdbcHandleType.Stmt, hstmt));\r
[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);