Closed GoogleCodeExporter closed 9 years ago
I have a pymssql only tests now for this in test_types.py:TestTypes.test_image.
There is also a commit in [bea17389d31e] which fixes this problem from a
technical standpoint. It simply turns all type(str) values into a hex
representation and sends that to MSSQL. This seems to work well from a
technical perspective.
However, the down-side is that it makes debugging difficult. If someone is
trying to debug a problem by watching SQL Server traces, they are only going to
see the hex coming over. Since character data will probably be the most common
type(str) to be sent over, this seems unideal.
Therefore, in [5ba20a7b7d70] I made the quote function smarter so that anything
that can be decoded as ascii will get put directly in the string. Everything
else gets hex encoded.
These changes are currently in my bb repo but I would appreciate a look over
what I have done to make sure it looks good.
Original comment by rsyr...@gmail.com
on 16 Apr 2011 at 5:37
Original issue reported on code.google.com by
rsyr...@gmail.com
on 15 Apr 2011 at 9:42