+2005-08-09 Sureshkumar T <tsureshkumar@novell.com>
+
+ * OdbcParameter.cs: setBuffer (): allocate a short int buffer for
+ OdbcType.SmallInt. fixes bug #75600.
+
2005-08-08 Gert Driesen <drieseng@users.sourceforge.net>
* OdbcConnection.cs: Marked Init helper method private.
// Bind parameter based on type
int ind = -3;
- if (odbcType == OdbcType.Int)
+ if (odbcType == OdbcType.Int || odbcType == OdbcType.SmallInt)
ret = libodbc.SQLBindParameter(hstmt, (ushort)ParamNum, (short)paramdir,
ctype, sqltype, Convert.ToUInt32(Size),
0, ref intbuf, 0, ref ind);
// Load buffer with new value
if (odbcType == OdbcType.Int)
intbuf = Value == null ? new int () : (int) Value;
+ else if (odbcType == OdbcType.SmallInt)
+ intbuf = Value == null ? new short () : Convert.ToInt16(Value);
else if (odbcType == OdbcType.Numeric
|| odbcType == OdbcType.Decimal) {
// for numeric, the buffer is a packed decimal struct.