Thanks! That works, and it even simplifies my code a little.

Regards,
Josh

On Mon, Nov 22, 2010 at 11:50 AM, Simon Slavin <slav...@bigfraud.org> wrote:
>
> On 22 Nov 2010, at 4:37pm, Joshua Lippai wrote:
>
>> I decided that a decent way to implement this would be to create a
>> dummy class in which I first wrap any objects that are not NumPy
>> datatypes or datetime. Then, I wrote an adapter function that I could
>> register the dummy class with, with the adapter simply returning the
>> output Pickle string. I also wrote an analogous converter function
>> that returns the result of loading the string with Pickle. The reason
>> for going to all this trouble to preserve the data is I want to be
>> able to convert back as well.
>>
>> My problem now is that when I try to use this dummy class, even though
>> my adapter function should be passing a string into sqlite, I get the
>> dreaded sqlite3 interface error:
>>
>> sqlite3.InterfaceError: Error binding parameter 0 - probably unsupported 
>> type.
>
> Make your container class in python, but have your SQLite interface register 
> the variables as BLOBs and use the SQLite functions related to BLOBs when 
> storing and retrieving your values from the database.  BLOBs are arbitrary 
> objects of any length you desire, and SQLite never does any conversion on the 
> values.
>
> Simon.
> _______________________________________________
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to