The solution for your problem is well described in the Detailed Description of QSqlQuery (Or have a look at the examples of the QtSql Module). What else do you need to know? Also it would be nice if you could show us what you have so far.
And the question if it is your homework was because we have the rule here, not to post solutions for homework. So you won't see any piece of code here! Also if you post some we can correct.
Bookmarks