From 30b7a7c89a8fd0816fb32dc56916d5d5d8ee53b3 Mon Sep 17 00:00:00 2001 From: Andreas Baumann Date: Sat, 28 Aug 2010 16:58:08 +0200 Subject: trying qtcreator --- tests/test9.MUST | 2 ++ tests/test9.cpp | 18 +++++++++++------- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/tests/test9.MUST b/tests/test9.MUST index e69de29..f4f0227 100644 --- a/tests/test9.MUST +++ b/tests/test9.MUST @@ -0,0 +1,2 @@ +creating DB.. +connection object is sqlite3xx::connection(test9.db) diff --git a/tests/test9.cpp b/tests/test9.cpp index b0d36b1..af4a035 100644 --- a/tests/test9.cpp +++ b/tests/test9.cpp @@ -33,13 +33,20 @@ using namespace std; int main( ) { (void)unlink( "test9.db" ); + + try { + cout << "creating DB.." << endl; + connection c( "test9.db" ); + cout << "connection object is " << c << endl; + + c.exec( "create table x( x integer )" ); + } catch( sql_error& e ) { + cerr << e.msg( ) << ": " << e.query( ) << endl; + } } /* try { - cout << "creating DB.." << endl; - connection c( "test9.db" ); - cout << "connection object is " << c << endl; cout << "starting transaction.." << endl; work wc( c, "create" ); @@ -96,8 +103,5 @@ int main( ) { wq.commit( ); cout << "end." << endl; - } catch( sql_error& e ) { - cerr << e.msg( ) << ": " << e.query( ) << endl; - } } -*/ \ No newline at end of file +*/ -- cgit v1.2.3-54-g00ecf