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

spaltenweise.cpp

Go to the documentation of this file.
00001 #include <qdir.h>
00002 
00003 #include <qpe/qpeapplication.h>
00004 #include <opie2/osqlmanager.h>
00005 #include <opie2/osqlquery.h>
00006 #include <opie2/osqldriver.h>
00007 #include <opie2/osqlresult.h>
00008 
00009 using namespace Opie::DB;
00010 
00011 int main( int argc,  char* argv[] ) {
00012 
00013     QPEApplication app( argc, argv );
00014     OSQLManager man;
00015     man.registerPath( QDir::currentDirPath() );
00016     OSQLBackEnd::ValueList list = man.queryBackEnd();
00017 
00018     OSQLDriver *driver = man.standard();
00019     owarn << "testmain" + driver->id() << oendl; 
00020     driver->setUrl("/home/ich/spaltenweise");
00021     if ( driver->open() ) {
00022         owarn << "could open" << oendl; 
00023     }else
00024         owarn << "wasn't able to open" << oendl; 
00025     OSQLRawQuery *raw = new OSQLRawQuery("create table todolist("
00026                                          "uid,categories,completed,"
00027                                          "progress,summary,HasDate,"
00028                                          "DateDay,DateMonth,DateYear,"
00029                                          "priority,description)" );
00030 
00031     OSQLResult res = driver->query( raw );
00032     delete raw;
00033     for (int i = 0; i< 10000; i++ ) {
00034         int uid = i;
00035         OSQLRawQuery raw("insert into todolist VALUES("+
00036                          QString::number(uid)+ ",'-122324;-12132',1,100,"+
00037                          "'Summary234-"+QString::number(uid)+"',1,5,8,2002,1,"+
00038                          "'Description\n12344')");
00039         OSQLResult res = driver->query( &raw );
00040 
00041     }
00042     return 0;
00043 };

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