Re: GTK - reading data from database

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Am Mittwoch, den 30.07.2008, 18:33 -0700 schrieb paragasu:
> i am writing a gtk application to interface with postgresql database.
> the database contain few hundred rows. how programmer usually do this,
> the load the entire database content to app or just load part of it?

First of all I'd suggest to have a look at libgda[1]. This library
abstracts database access and also provides widgets for database access.
Maybe those guys already invented the wheel you need.

Otherwise I'd implement a custom list store, which first just do a
"SELECT COUNT(*) ..." query to create empty rows, and then only fetches
rows from the database when some range with still empty rows get
visible. You'll easily detect the need for fetching more rows by waiting
for the tree view calling your list store's get_value() method.

Ciao,
Mathias

[1]: http://www.gnome-db.org/
-- 
Mathias Hasselmann <mathias.hasselmann@xxxxxx>
Openismus GmbH: http://www.openismus.com/
Personal Site: http://taschenorakel.de/

Attachment: signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil

_______________________________________________
gtk-list mailing list
gtk-list@xxxxxxxxx
http://mail.gnome.org/mailman/listinfo/gtk-list

[Index of Archives]     [Touch Screen Library]     [GIMP Users]     [Gnome]     [KDE]     [Yosemite News]     [Steve's Art]

  Powered by Linux