Results 1 to 5 of 5

Thread: SQLITE3, GtkTreeView and C problem !

  1. #1
    Join Date
    Oct 2008
    Location
    INDIA
    Beans
    331
    Distro
    Ubuntu 12.04 Precise Pangolin

    SQLITE3, GtkTreeView and C problem !

    Hello friends,

    The below given code is not displaying the list from sqlite3 database. please help.

    Code:
    void
    populate_list()
    {
        GtkTreeIter iter;
        
        ledger_store = gtk_list_store_new (9, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING,
            G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING);
        
        exec_sql ("select * from ledgers", 10000);
        
        while (sqlite3_step (Database.result) == SQLITE_ROW)
        {
            gtk_list_store_append (ledger_store, &iter);
            gtk_list_store_set (ledger_store, &iter,
                COL_DEMANDNO, sqlite3_column_text (Database.result, 0),
                COL_CENSUSNO, sqlite3_column_text (Database.result, 1),
                COL_YEAR, sqlite3_column_text (Database.result, 2),
                COL_NAME, sqlite3_column_text (Database.result, 3),
                COL_CASTE, sqlite3_column_text (Database.result, 4),
                COL_ADDRESS, sqlite3_column_text (Database.result, 5),
                COL_MOBILENO, sqlite3_column_text (Database.result, 6),
                COL_STREET, sqlite3_column_text (Database.result, 7),
                COL_WARDNO, sqlite3_column_text (Database.result, 8),
                -1);
        
        }
    
        sqlite3_finalize (Database.result);
    }
    Controlling complexity is the essence of computer programming. - Brian

  2. #2
    Join Date
    Oct 2008
    Location
    INDIA
    Beans
    331
    Distro
    Ubuntu 12.04 Precise Pangolin

    Wink Re: SQLITE3, GtkTreeView and C problem !

    is there anyone who can help me please?
    Controlling complexity is the essence of computer programming. - Brian

  3. #3
    Join Date
    Oct 2008
    Location
    INDIA
    Beans
    331
    Distro
    Ubuntu 12.04 Precise Pangolin

    Wink Re: SQLITE3, GtkTreeView and C problem !

    bump
    Controlling complexity is the essence of computer programming. - Brian

  4. #4
    Join Date
    Oct 2008
    Location
    INDIA
    Beans
    331
    Distro
    Ubuntu 12.04 Precise Pangolin

    Thumbs down Re: SQLITE3, GtkTreeView and C problem !

    Please help me friends !
    Controlling complexity is the essence of computer programming. - Brian

  5. #5
    Join Date
    Oct 2008
    Location
    INDIA
    Beans
    331
    Distro
    Ubuntu 12.04 Precise Pangolin

    Wink Re: SQLITE3, GtkTreeView and C problem !

    Strange guys,

    For the first time I haven't got any replies from the past two days.

    Really strange.....
    Controlling complexity is the essence of computer programming. - Brian

Tags for this Thread

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
  •