encoding/decoding issue with python2.5 and pymssql
Tzury Bar Yochay
Afro.Systems at gmail.com
Mon Mar 24 06:33:58 CET 2008
in my table the field row_id is type of uniqueidentifier.
when try to fetch the data, pymssql somehow, encodes the values in a
way which yields odd results.
is represent as
the only way I manged to pass this is by converting the value into
varchar at the server side.
I would like to solve this at the python side and not in the database
for several obvious reasons
>>> conn = mymssql.connect(**connection_details)
>>> cur = conn.cursor()
>>> sql = "select row_id, cast(row_id as varchar(36)) from table_a"
>>> rows = cur.fetchall()
More information about the Python-list