diff options
Diffstat (limited to 'tqtinterface/qt4/tools/designer/examples/book/book6/editbook.ui.h')
-rw-r--r-- | tqtinterface/qt4/tools/designer/examples/book/book6/editbook.ui.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tqtinterface/qt4/tools/designer/examples/book/book6/editbook.ui.h b/tqtinterface/qt4/tools/designer/examples/book/book6/editbook.ui.h new file mode 100644 index 0000000..28d5035 --- /dev/null +++ b/tqtinterface/qt4/tools/designer/examples/book/book6/editbook.ui.h @@ -0,0 +1,10 @@ +void EditBookForm::primeInsertBook( TQSqlRecord * buffer ) +{ + TQSqlQuery 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 ) ); + } +} + |