Eliminate "extra" variable

Igor Korot ikorot01 at gmail.com
Sun Dec 15 17:46:18 EST 2013


Tim,

On Sun, Dec 15, 2013 at 4:29 AM, Tim Chase
<python.list at tim.thechases.com> wrote:
> On 2013-12-15 06:17, Tim Chase wrote:
>>>>>>> conn = sqlite3.connect('x.sqlite',
>>>>... detect_types=sqlite3.PARSE_DECLTYPES|sqlite3.PARSE_COLNAMES)
>>
>> Your example code omitted this one crucial line.  Do you specify the
>> detect_types parameter to connect()?

Yes, I did.
This is the beginning of the session:

>>> import sqlite3
>>> conn = sqlite3.connect('c:\Documents and Settings\Igor.FORDANWORK\Desktop\mydb.db', detect_types = sqlite3.PARSE_DECLTYPES|sqlite3.PARSE_COLNAMES)

Also please note that you session was missing the cursor creation command. ;-)

Thank you.

>
> It's really the PARSE_DECLTYPES that is important.
>
> http://docs.python.org/2/library/sqlite3.html#sqlite3.PARSE_DECLTYPES
>
> -tkc
>
>
> --
> https://mail.python.org/mailman/listinfo/python-list



More information about the Python-list mailing list