×

Discussion Board

Results 1 to 3 of 3

Thread: Query

  1. #1
    Regular Contributor
    Join Date
    Oct 2008
    Posts
    323

    Question Query

    Dear all,

    i am using Qt in Symbian .

    QSqlQuery query;
    query.prepare(QString("select Number,Enable from FilterNumTable where Enable = '1'"));

    it will show like this

    Number Enable
    ------ ------
    12345 1
    12346 1
    12347 1

    how can i store the Number in to < Array or QList >
    how to store?
    any one have idea about this?

  2. #2
    Super Contributor
    Join Date
    Oct 2009
    Posts
    4,326

    Re: Query

    Code:
    QList<int> numbers;
    QSqlQuery query("SELECT Number FROM FilterNumTable WHERE Enable = '1'");
    while (query.next()) {
        numbers << query.value(0).toInt();
    }

  3. #3
    Regular Contributor
    Join Date
    Oct 2008
    Posts
    323

    Thumbs up Re: Query

    Quote Originally Posted by divanov View Post
    Code:
    QList<int> numbers;
    QSqlQuery query("SELECT Number FROM FilterNumTable WHERE Enable = '1'");
    while (query.next()) {
        numbers << query.value(0).toInt();
    }
    really thx divanov last two days ur helping me lot ?

Similar Threads

  1. DBMS Query problem?
    By PopAndDestroy in forum Symbian
    Replies: 1
    Last Post: 2010-02-22, 02:19
  2. help in sql query!!
    By raj8nokiaforum in forum Symbian
    Replies: 2
    Last Post: 2010-01-15, 06:57
  3. MultiSelection List Query
    By sambo1972 in forum Symbian User Interface
    Replies: 2
    Last Post: 2009-04-23, 07:42
  4. I cannot send query string to the servlet
    By raghda in forum Mobile Java Networking & Messaging & Security
    Replies: 1
    Last Post: 2007-09-10, 07:23
  5. Multiline Query in 3rd edition sdk
    By parag_purkar in forum Symbian User Interface
    Replies: 1
    Last Post: 2006-09-26, 03:54

Posting Permissions

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