When I attempt to bind a null-terminated Unicode string parameter using
SQLBindParameter, the database engine receives a string representation of
today's date instead of the data I passed. The same issue does not occur if
I explicitly specify the length of the string instead of using SQL_NTS.
[jeremy <NOSPAM> accessdata.com]
break;
case SQL_C_WCHAR:
+ if (SQL_NTS == used)
+ used = WCLEN * wcslen((SQLWCHAR *) buffer);
buf = allocbuf = ucs2_to_utf8((SQLWCHAR *) buffer, used / WCLEN, (UInt4 *) &used, FALSE);
used *= WCLEN;
break;