Hi,

I often use dataSet's in memory.  Such as 'dataDS.execute("select * from dataset order by pkid")' where dataDS = an existing dataset.  The issue becomes that for some reason the query returns a value as "b('330')".  Therefore, strVal becomes "b(330')" this causes Decimal(strVal) to fail.  I added the code below and it works.

I don't have a clue why or what is the root cause.  But I wonder if some change has occurred in sqlite for python3.  I think this maybe only fixing a symptom.

class dDataSet -> _convert_decimal(strVal)

def _convert_decimal(strVal):
        """This is a converter routine. Takes the string representation of a
        Decimal value and return an actual decimal.
        """
        if isinstance(strVal, bytes):
            strVal = strVal.decode("utf-8")
        return Decimal(strVal)




_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/dabo-dev
Searchable Archives: https://leafe.com/archives
This message: 
https://leafe.com/archives/byMID/[email protected]

Reply via email to