[Tutor] Need help with sqlite3 in python

Jim Byrnes jf_byrnes at comcast.net
Sun Feb 17 20:47:04 CET 2013


On 02/17/2013 12:31 PM, Alan Gauld wrote:
> On 17/02/13 16:50, Jim Byrnes wrote:
>
>>      cur.execute("INSERT INTO pwds VALUES ('WebSites', 'xMe', 'me',
>> 'you', 'here', 'there')")
>>
>> When this code is run, done prints in the terminal, there is no error
>
> Can you do selects properly?
> Can you extract data put in manually? That would prove the connection
> from Python to SQLite was working...

Thank you Alan.  Your question led me to the solution. So many times it 
is dumb little mistakes that trip you up. I had moved a copy of the db 
into the directory I was developing in but was inserting in  the working 
copy.  The insertions were there I was just looking at the wrong db with 
Sqliteman.

> Usually when I get errors like that its because the values do not match
> the number of fields/types in the table definition, but if the manual
> sql works with the same query that shouldn't be the issue so I'd suspect
> the connection...
>

Regards,  Jim



More information about the Tutor mailing list