summaryrefslogtreecommitdiff
path: root/libopie2/examples/opiedb
authorar <ar>2004-06-03 18:50:11 (UTC)
committer ar <ar>2004-06-03 18:50:11 (UTC)
commitf9d940da940c8d42dc072f60ad72e69025650cf8 (patch) (unidiff)
treed27646ceea53d25f68bc53f770424a3b3c434994 /libopie2/examples/opiedb
parent75922e8dd0f7390932471b5a611d94076a8472f3 (diff)
downloadopie-f9d940da940c8d42dc072f60ad72e69025650cf8.zip
opie-f9d940da940c8d42dc072f60ad72e69025650cf8.tar.gz
opie-f9d940da940c8d42dc072f60ad72e69025650cf8.tar.bz2
- convert to odebug framework
Diffstat (limited to 'libopie2/examples/opiedb') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/examples/opiedb/sqltest/main.cpp42
-rw-r--r--libopie2/examples/opiedb/sqltest/spaltenweise.cpp6
-rw-r--r--libopie2/examples/opiedb/sqltest/zeilenweise.cpp6
3 files changed, 43 insertions, 11 deletions
diff --git a/libopie2/examples/opiedb/sqltest/main.cpp b/libopie2/examples/opiedb/sqltest/main.cpp
index adca5fd..24b7b21 100644
--- a/libopie2/examples/opiedb/sqltest/main.cpp
+++ b/libopie2/examples/opiedb/sqltest/main.cpp
@@ -1,10 +1,42 @@
1#include <qdir.h> 1/*
2 =. This file is part of the Opie Project
3 .=l. Copyright (C) 2004 Opie Team <opie@handhelds.org>
4 .>+-=
5 _;:, .> :=|. This library is free software; you can
6.> <`_, > . <= redistribute it and/or modify it under
7:`=1 )Y*s>-.-- : the terms of the GNU Library General Public
8.="- .-=="i, .._ License as published by the Free Software
9 - . .-<_> .<> Foundation; either version 2 of the License,
10 ._= =} : or (at your option) any later version.
11 .%`+i> _;_.
12 .i_,=:_. -<s. This library is distributed in the hope that
13 + . -:. = it will be useful, but WITHOUT ANY WARRANTY;
14 : .. .:, . . . without even the implied warranty of
15 =_ + =;=|` MERCHANTABILITY or FITNESS FOR A
16 _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU
17..}^=.= = ; Library General Public License for more
18++= -. .` .: details.
19 : = ...= . :.=-
20 -. .:....=;==+<; You should have received a copy of the GNU
21 -_. . . )=. = Library General Public License along with
22 -- :-=` this library; see the file COPYING.LIB.
23 If not, write to the Free Software Foundation,
24 Inc., 59 Temple Place - Suite 330,
25 Boston, MA 02111-1307, USA.
2 26
3#include <qpe/qpeapplication.h> 27*/
28
29/* OPIE */
4#include <opie2/osqlmanager.h> 30#include <opie2/osqlmanager.h>
5#include <opie2/osqlquery.h> 31#include <opie2/osqlquery.h>
6#include <opie2/osqldriver.h> 32#include <opie2/osqldriver.h>
7#include <opie2/osqlresult.h> 33#include <opie2/osqlresult.h>
34#include <opie2/odebug.h>
35
36#include <qpe/qpeapplication.h>
37
38/* QT */
39#include <qdir.h>
8 40
9using namespace Opie::DB; 41using namespace Opie::DB;
10int main( int argc, char* argv[] ) { 42int main( int argc, char* argv[] ) {
@@ -15,12 +47,12 @@ man.registerPath( QDir::currentDirPath() );
15OSQLBackEnd::ValueList list = man.queryBackEnd(); 47OSQLBackEnd::ValueList list = man.queryBackEnd();
16 48
17OSQLDriver *driver = man.standard(); 49OSQLDriver *driver = man.standard();
18 qWarning("testmain" + driver->id() ); 50 owarn << "testmain" + driver->id() << oendl;
19 driver->setUrl("/home/ich/test2vhgytry"); 51 driver->setUrl("/home/ich/test2vhgytry");
20 if ( driver->open() ) { 52 if ( driver->open() ) {
21 qWarning("could open"); 53 owarn << "could open" << oendl;
22 }else 54 }else
23 qWarning("wasn't able to open"); 55 owarn << "wasn't able to open" << oendl;
24 OSQLRawQuery raw("select * from t2" ); 56 OSQLRawQuery raw("select * from t2" );
25 OSQLResult res = driver->query( &raw ); 57 OSQLResult res = driver->query( &raw );
26 58
diff --git a/libopie2/examples/opiedb/sqltest/spaltenweise.cpp b/libopie2/examples/opiedb/sqltest/spaltenweise.cpp
index e1a4d5d..c11724c 100644
--- a/libopie2/examples/opiedb/sqltest/spaltenweise.cpp
+++ b/libopie2/examples/opiedb/sqltest/spaltenweise.cpp
@@ -16,12 +16,12 @@ int main( int argc, char* argv[] ) {
16 OSQLBackEnd::ValueList list = man.queryBackEnd(); 16 OSQLBackEnd::ValueList list = man.queryBackEnd();
17 17
18 OSQLDriver *driver = man.standard(); 18 OSQLDriver *driver = man.standard();
19 qWarning("testmain" + driver->id() ); 19 owarn << "testmain" + driver->id() << oendl;
20 driver->setUrl("/home/ich/spaltenweise"); 20 driver->setUrl("/home/ich/spaltenweise");
21 if ( driver->open() ) { 21 if ( driver->open() ) {
22 qWarning("could open"); 22 owarn << "could open" << oendl;
23 }else 23 }else
24 qWarning("wasn't able to open"); 24 owarn << "wasn't able to open" << oendl;
25 OSQLRawQuery *raw = new OSQLRawQuery("create table todolist(" 25 OSQLRawQuery *raw = new OSQLRawQuery("create table todolist("
26 "uid,categories,completed," 26 "uid,categories,completed,"
27 "progress,summary,HasDate," 27 "progress,summary,HasDate,"
diff --git a/libopie2/examples/opiedb/sqltest/zeilenweise.cpp b/libopie2/examples/opiedb/sqltest/zeilenweise.cpp
index 2d11ac5..126e797 100644
--- a/libopie2/examples/opiedb/sqltest/zeilenweise.cpp
+++ b/libopie2/examples/opiedb/sqltest/zeilenweise.cpp
@@ -16,12 +16,12 @@ man.registerPath( QDir::currentDirPath() );
16OSQLBackEnd::ValueList list = man.queryBackEnd(); 16OSQLBackEnd::ValueList list = man.queryBackEnd();
17 17
18OSQLDriver *driver = man.standard(); 18OSQLDriver *driver = man.standard();
19 qWarning("testmain" + driver->id() ); 19 owarn << "testmain" + driver->id() << oendl;
20 driver->setUrl("/home/ich/zeilenweise"); 20 driver->setUrl("/home/ich/zeilenweise");
21 if ( driver->open() ) { 21 if ( driver->open() ) {
22 qWarning("could open"); 22 owarn << "could open" << oendl;
23 }else 23 }else
24 qWarning("wasn't able to open"); 24 owarn << "wasn't able to open" << oendl;
25 OSQLRawQuery raw2("BEGIN TRANSACTION"); 25 OSQLRawQuery raw2("BEGIN TRANSACTION");
26 OSQLRawQuery *raw = new OSQLRawQuery("create table todolist(uid,key,value)"); 26 OSQLRawQuery *raw = new OSQLRawQuery("create table todolist(uid,key,value)");
27 OSQLResult res = driver->query( &raw2 ); 27 OSQLResult res = driver->query( &raw2 );