Hello
I've got following problem since a week:
I have a QSqlTableModel that I use to view data from a database in a calendar
model=new QSqlTableModel(0,db);
query=new QSqlQuery(db);
To copy to clipboard, switch view to plain text mode
db is a QSqlDatabase
When i want to make a query from the database using a SQL statement i use " query" that is connected to db
When i want to insert record i proceed like that:
I create a QSqlRecord that contains values of the new record then I call
model->insertRecord(-1,record)
model->insertRecord(-1,record)
To copy to clipboard, switch view to plain text mode
The problem is that although the recording is successfull (when closing the programm and re-open it i can see it) but it seems like the database would be updated only when closing it because i can not see it through a query just after insertion although i call model->submitAll after each insertion .. and trying different EditStrategy..
Any ideas? Don't hesitate to give me advice on how to do it easier as i'm not very good with Programming
Bookmarks