SQL Server port: convert Password to Binary
This conversion is required because pyodbc uses buffers for Binary fields
and won't be able to cast a string/unicode value to the db VARBINARY column
type otherwise.
--- a/server/sqlutils.py Fri Dec 18 15:59:19 2009 +0100
+++ b/server/sqlutils.py Tue Dec 22 09:33:08 2009 +0100
@@ -241,6 +241,7 @@
value = value.getvalue()
else:
value = crypt_password(value)
+ value = self.binary(value)
# XXX needed for sqlite but I don't think it is for other backends
elif atype == 'Datetime' and isinstance(value, date):
value = todatetime(value)