Coder Social home page Coder Social logo

Comments (1)

GoogleCodeExporter avatar GoogleCodeExporter commented on August 18, 2024
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 [email protected] on 16 Apr 2011 at 5:37

  • Changed title: better handling for byte strings that don't represent ascii data
  • Changed state: Fixed

from pymssql.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.