Re: [sqlite] Problem with inserting and integer primary key

2008-10-16 Thread John Belli
On Wed, 15 Oct 2008 12:43:00 -0400, "Igor Tandetnik" <[EMAIL PROTECTED]> wrote: >Be aware that, in order to create a column that aliases ROWID (and thus >has special properties in SQLite, such as getting an automatically >assigned unique integer) it has to be spelled precisely INTEGER PRIMARY >

Re: [sqlite] Problem with inserting and integer primary key

2008-10-15 Thread Igor Tandetnik
Karl Lautman <[EMAIL PROTECTED]> wrote: > So, I create a table as follows: > > CREATE TABLE IF NOT EXISTS Lists ( > wID integer, > ltitle text, > llink text, > units text, > date text, > ListsID integer, > new integer > , CONSTRAINT Lists_pk PRIMARY KEY (ListsID)) Be aware that, in order to create

Re: [sqlite] Problem with inserting and integer primary key

2008-10-15 Thread Scott Baker
On 10/15/2008 09:27 AM, Karl Lautman wrote: > To insert data I do (this is in Python): > > > > x = dcur.execute('insert into Lists values (?, ?, ?, ?, ?, ?)', (123, > 'YouTube Videos','http://www.youtube.com', 'views', '10/14/08', 4)) Just add NULL for the primary key value. SQLite will autopopula

[sqlite] Problem with inserting and integer primary key

2008-10-15 Thread Karl Lautman
So, I create a table as follows: CREATE TABLE IF NOT EXISTS Lists ( wID integer, ltitle text, llink text, units text, date text, ListsID integer, new integer , CONSTRAINT Lists_pk PRIMARY KEY (ListsID)) To insert data I do (this is in Python): x = dcur.execute('insert into Lists