Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

main.cpp

Go to the documentation of this file.
00001 /*
00002                =.            This file is part of the Opie Project
00003              .=l.            Copyright (C) 2004 Opie Team <opie-devel@handhelds.org>
00004            .>+-=
00005  _;:,     .>    :=|.         This library is free software; you can
00006 .> <`_,   >  .   <=          redistribute it and/or  modify it under
00007 :`=1 )Y*s>-.--   :           the terms of the GNU Library General Public
00008 .="- .-=="i,     .._         License as published by the Free Software
00009  - .   .-<_>     .<>         Foundation; either version 2 of the License,
00010      ._= =}       :          or (at your option) any later version.
00011     .%`+i>       _;_.
00012     .i_,=:_.      -<s.       This library is distributed in the hope that
00013      +  .  -:.       =       it will be useful,  but WITHOUT ANY WARRANTY;
00014     : ..    .:,     . . .    without even the implied warranty of
00015     =_        +     =;=|`    MERCHANTABILITY or FITNESS FOR A
00016   _.=:.       :    :=>`:     PARTICULAR PURPOSE. See the GNU
00017 ..}^=.=       =       ;      Library General Public License for more
00018 ++=   -.     .`     .:       details.
00019  :     =  ...= . :.=-
00020  -.   .:....=;==+<;          You should have received a copy of the GNU
00021   -_. . .   )=.  =           Library General Public License along with
00022     --        :-=`           this library; see the file COPYING.LIB.
00023                              If not, write to the Free Software Foundation,
00024                              Inc., 59 Temple Place - Suite 330,
00025                              Boston, MA 02111-1307, USA.
00026 
00027 */
00028 
00029 /* OPIE */
00030 #include <opie2/osqlmanager.h>
00031 #include <opie2/osqlquery.h>
00032 #include <opie2/osqldriver.h>
00033 #include <opie2/osqlresult.h>
00034 #include <opie2/odebug.h>
00035 
00036 #include <qpe/qpeapplication.h>
00037 
00038 /* QT */
00039 #include <qdir.h>
00040 
00041 using namespace Opie::DB;
00042 int main( int argc,  char* argv[] ) {
00043 
00044 QPEApplication app( argc, argv );
00045 OSQLManager man;
00046 man.registerPath( QDir::currentDirPath() );
00047 OSQLBackEnd::ValueList list = man.queryBackEnd();
00048 
00049 OSQLDriver *driver = man.standard();
00050  owarn << "testmain" + driver->id() << oendl;
00051  driver->setUrl("/home/ich/test2vhgytry");
00052  if ( driver->open() ) {
00053      owarn << "could open" << oendl;
00054  }else
00055      owarn << "wasn't able to open" << oendl;
00056  OSQLRawQuery raw("select * from t2" );
00057  OSQLResult res = driver->query( &raw );
00058 
00059  OSQLRawQuery raw2( "insert into t2 VALUES(ROWID,'Meine Mutter') ");
00060  res = driver->query(&raw2);
00061 
00062 };

Generated on Sat Nov 5 16:15:25 2005 for OPIE by  doxygen 1.4.2