summaryrefslogtreecommitdiffstats
path: root/tools/designer/examples/book/book6/editbook.ui.h
diff options
context:
space:
mode:
Diffstat (limited to 'tools/designer/examples/book/book6/editbook.ui.h')
-rw-r--r--tools/designer/examples/book/book6/editbook.ui.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/tools/designer/examples/book/book6/editbook.ui.h b/tools/designer/examples/book/book6/editbook.ui.h
new file mode 100644
index 000000000..28d5035f8
--- /dev/null
+++ b/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 ) );
+ }
+}
+