summaryrefslogtreecommitdiffstats
path: root/tools/designer/examples/book/book6/editbook.ui.h
blob: eb76ac3abf1bc8af487cfe7dce998737ed963f0c (plain)
1
2
3
4
5
6
7
8
9
10
void EditBookForm::primeInsertBook( QSqlRecord * buffer )
{
    QSqlQuery query;  
    query.exec( "UPDATE sequence SET sequence = sequence + 1 WHERE tablename='book';" );  
    query.exec( "SELECT sequence FROM sequence WHERE tablename='book';" );  
    if ( query.next() ) {  
	buffer->setValue( "id", query.value( 0 ) );  
    }     
}