Results 1 to 3 of 3

Thread: question about sqlite ( qt 4 )

  1. #1
    Join Date
    Dec 2008
    Posts
    17
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default question about sqlite ( qt 4 )

    hello everybody. i wrote a simple application that creates a database.

    Qt Code:
    1. db = QSqlDatabase::addDatabase("QSQLITE");
    2. db.setHostName("home");
    3. db.setDatabaseName(text1);
    4. db.setUserName(text2);
    5. db.setPassword(text3);
    6. ok = db.open();
    To copy to clipboard, switch view to plain text mode 

    the dabase creates ok . i re-run my program and try opening the same database but with different username and password. it opens quite fine without giving an error about wrong username or password. what am i doing wrong?
    Last edited by msmihai; 18th December 2008 at 18:54.

  2. #2
    Join Date
    May 2008
    Posts
    276
    Thanks
    13
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: question about sqlite ( qt 4 )

    I think SQLITe does not support passwords....
    G

  3. #3
    Join Date
    Dec 2008
    Location
    chinese
    Posts
    47
    Thanks
    3
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: question about sqlite ( qt 4 )

    Quote Originally Posted by msmihai View Post
    hello everybody. i wrote a simple application that creates a database.

    Qt Code:
    1. db = QSqlDatabase::addDatabase("QSQLITE");
    2. db.setHostName("home");
    3. db.setDatabaseName(text1);
    4. db.setUserName(text2);
    5. db.setPassword(text3);
    6. ok = db.open();
    To copy to clipboard, switch view to plain text mode 

    the dabase creates ok . i re-run my program and try opening the same database but with different username and password. it opens quite fine without giving an error about wrong username or password. what am i doing wrong?
    yes,qslite is embed database,it's not support password i think

Similar Threads

  1. SQLite - check if any records are returned
    By amicitas in forum Newbie
    Replies: 1
    Last Post: 28th September 2008, 10:28
  2. sqlite and date
    By Raccoon29 in forum General Programming
    Replies: 2
    Last Post: 18th August 2008, 11:43
  3. SQLite
    By cyberboy in forum Installation and Deployment
    Replies: 1
    Last Post: 15th April 2008, 19:46
  4. sqlbrowser and sqlite
    By janus in forum Installation and Deployment
    Replies: 2
    Last Post: 31st March 2008, 14:59

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.