Re: [Interest] How to insert a new record with generated primary key into a QSqlTableModel

2013-12-12 Thread Scott Aron Bloom
, 2013 10:32 PM To: interest@qt-project.org Subject: Re: [Interest] How to insert a new record with generated primary key into a QSqlTableModel I'm using SQLite, hopefully it'll support it. Where would I get the QSqlResult::lastInserId() though? I really don't want my databas

Re: [Interest] How to insert a new record with generated primary key into a QSqlTableModel

2013-12-12 Thread Knut Krause
terest-bounces+scott=onshorecs@qt-project.org] On Behalf Of > Knut Krause Sent: Thursday, December 12, 2013 10:16 PM > To: interest@qt-project.org > Subject: [Interest] How to insert a new record with generated primary key > into a QSqlTableModel > > Hi, > > I got a DataMa

Re: [Interest] How to insert a new record with generated primary key into a QSqlTableModel

2013-12-12 Thread Scott Aron Bloom
: interest@qt-project.org Subject: [Interest] How to insert a new record with generated primary key into a QSqlTableModel Hi, I got a DataMapper set up like http://pastebin.com/k9kB1N1a Editing the existing model works really fine but how can I add a new customer? I basically need to insert a new record

[Interest] How to insert a new record with generated primary key into a QSqlTableModel

2013-12-12 Thread Knut Krause
Hi, I got a DataMapper set up like http://pastebin.com/k9kB1N1a Editing the existing model works really fine but how can I add a new customer? I basically need to insert a new record to the model with an auto generated id (from my DB) and then set the mapper to the correct ModelIndex. How would