[pywin32-checkins] pywin32/win32/src odbc.cpp,1.16,1.17
OLD project page for the Python extensions for Windows
Brought to you by:
mhammond
From: Mark H. <mha...@us...> - 2006-05-24 08:40:46
|
Update of /cvsroot/pywin32/pywin32/win32/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14178 Modified Files: odbc.cpp Log Message: Using SQL_VARCHAR/SQL_WVARCHAR instead of SQL_CHAR/SQL_WCHAR prevents padding of zero byte strings with SQLServer. Index: odbc.cpp =================================================================== RCS file: /cvsroot/pywin32/pywin32/win32/src/odbc.cpp,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** odbc.cpp 15 Mar 2006 04:01:35 -0000 1.16 --- odbc.cpp 24 May 2006 08:40:41 -0000 1.17 *************** *** 863,867 **** strcpy(ib->bind_area, val); ! int sqlType = SQL_CHAR; if (len > 255) { --- 863,867 ---- strcpy(ib->bind_area, val); ! int sqlType = SQL_VARCHAR; // SQL_CHAR can cause padding in some drivers.. if (len > 255) { *************** *** 907,911 **** wcscpy((WCHAR *)ib->bind_area, wval); ! int sqlType = SQL_WCHAR; if (nbytes > 255) { --- 907,912 ---- wcscpy((WCHAR *)ib->bind_area, wval); ! // See above re SQL_VARCHAR ! int sqlType = SQL_WVARCHAR; if (nbytes > 255) { |