×

Discussion Board

Results 1 to 8 of 8

Thread: sqlite & tower

  1. #1
    Registered User
    Join Date
    Jun 2009
    Posts
    8

    sqlite & tower

    Hi,

    can anyone please explain this to me (from tower release notes):

    Code:
    - QtSql
        * Implemented QtSql module with sqlite3 backend. For now backend is
          provided only in binary format.
    I guess it is not an ordinary plugin and i can not use it like
    Code:
    QSqlDatabase db = QSqlDatabase::addDatabase("QSQLITE");
    Do I need to link the lib and use sqlite c api? How can I use that together with QtSql (sry, maybe a stupid question)

  2. #2
    Registered User
    Join Date
    Jun 2009
    Posts
    17

    Re: sqlite & tower

    all is explain here
    http://pepper.troll.no/s60prerelease...l.html#details
    http://pepper.troll.no/s60prerelease...ql-driver.html

    Qt use plugin(driver / backend choose your term ) to interface a lot of DB with there QtSql module, which are loaded dynamically. You
    By default, sqlite3 backend is compiled. For other DB you must build it.
    -------------------------------------------------------------------------------------
    Contributor (Username : yan) from the French Qt community : http://qt.developpez.com/
    * Forum
    * Qt FAQ (100 QR)
    * Advanced and Beginner Tutorials

  3. #3
    Registered User
    Join Date
    Jun 2009
    Posts
    8

    Re: sqlite & tower

    thx for the link to the docs

    My problem was that my app crashes if I try the code above. Thought I might need to do something else than in "ordinary" Qt.

  4. #4
    Registered User
    Join Date
    Jun 2009
    Posts
    17

    Re: sqlite & tower

    Quote Originally Posted by janusius View Post
    My problem was that my app crashes if I try the code above.
    this code crash???
    Code:
    QSqlDatabase db = QSqlDatabase::addDatabase("QSQLITE");
    have a simple code with this crash?
    -------------------------------------------------------------------------------------
    Contributor (Username : yan) from the French Qt community : http://qt.developpez.com/
    * Forum
    * Qt FAQ (100 QR)
    * Advanced and Beginner Tutorials

  5. #5
    Registered User
    Join Date
    Jun 2009
    Posts
    8

    Re: sqlite & tower

    Code:
    #include <QtGui>
    #include <QApplication>
    #include <QSqlDatabase>
    
    int main(int argc, char *argv[])
    {
        QApplication a(argc, argv);
        
        QLabel label;
        
        QString privatePath(QDir::toNativeSeparators(QDir::currentPath()));
        privatePath.append(QDir::separator()).append("db.sqlite");
        	
        QSqlDatabase db = QSqlDatabase::addDatabase("QSQLITE");
    //    db.setDatabaseName("privatePath");
    //    db.setDatabaseName(":memory:");
         
    //    if (db.open())
        	label.setText(privatePath);
        
        label.show();
        
        return a.exec();
    }
    This returns with "Application closed: KERN-EXEC 3". If I remove "QSqlDatabase db = ..." it doesn't.

  6. #6
    Registered User
    Join Date
    Jun 2009
    Posts
    17

    Re: sqlite & tower

    i test your code with Qt tower s60 sdk 5th
    It don't have any crash with emulator.
    I juste change show by showMaximezed and add QT += sql in .pro
    -------------------------------------------------------------------------------------
    Contributor (Username : yan) from the French Qt community : http://qt.developpez.com/
    * Forum
    * Qt FAQ (100 QR)
    * Advanced and Beginner Tutorials

  7. #7
    Registered User
    Join Date
    Jun 2009
    Posts
    8

    Re: sqlite & tower

    thank you mongaulois.

    Dont know whats wrong with my installation Maybe I try to reinstall the whole thing. But everything else seems to work.

  8. #8
    Registered User
    Join Date
    Jun 2009
    Posts
    17

    Re: sqlite & tower

    Quote Originally Posted by janusius View Post
    thank you mongaulois.

    Dont know whats wrong with my installation Maybe I try to reinstall the whole thing. But everything else seems to work.
    Sorry, i'm ever newbies with Qt on S60.
    I explain with my Qt desktop knowledge
    Have you installed OpenC-1.5.5b-beta plugin and patch your Carbide make?
    http://pepper.troll.no/s60prereleases/patches/


    Maybe reinstall all is a good thinks. So more, you should install Carbide.c++ , S60 sdk and Qt tower in there original path.

    Good luck
    -------------------------------------------------------------------------------------
    Contributor (Username : yan) from the French Qt community : http://qt.developpez.com/
    * Forum
    * Qt FAQ (100 QR)
    * Advanced and Beginner Tutorials

Similar Threads

  1. SQLite for Symbian OS version <9.4
    By elviin in forum Symbian
    Replies: 5
    Last Post: 2009-08-17, 09:11
  2. SQLite for Symbian OS v9.1 S60? PySQLite
    By shoot.spam in forum Open C/C++
    Replies: 4
    Last Post: 2009-06-08, 07:08
  3. Distance between mobile and tower
    By jkumar80 in forum Symbian
    Replies: 1
    Last Post: 2009-05-30, 17:31
  4. sqlite database on symbian devices
    By simmik in forum Symbian
    Replies: 2
    Last Post: 2007-05-17, 13:08
  5. Location triangulation based on cell tower signals
    By RichardClarke in forum Nokia M2M
    Replies: 10
    Last Post: 2004-11-09, 04:20

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×