patch to pymssql
public python v1 · immutabledef _quote(x): if type(x) == types.StringType: x = "'" + string.replace(str(x), "'", "''") + "'" elif type(x) in (types.IntType, types.LongType, types.FloatType): pass elif x is None: x = 'NULL' elif hasattr(x, '__pg_repr__'): x = x.__pg_repr__() elif hasattr(x, 'timetuple'): x = time.strftime('%Y%m%d %H:%M:%S', x.timetuple()) print x x = _quote(x) else: #print "didn't like " + x + " " + str(type(x)) raise InterfaceError, 'do not know how to handle type %s' % type(x) return x