Re: GTK - reading data from database
- From: paragasu <paragasu gmail com>
- To: "Vivien Malerba" <vmalerba gmail com>
- Cc: gtk-list gnome org
- Subject: Re: GTK - reading data from database
- Date: Thu, 31 Jul 2008 02:33:26 -0700
i am developing a small gtk application using postgresql database to store
a simple data for a motocycle company, the database only store client
information.
but it is quite tough because this is my first time writing gtk
application (using c).
i prefer debian linux for developing the application but the real
environment the
program will be run is windows XP. i am not confident enough to use libgnomedb
because i afraid the dependencies i have go trough when i try to
compile the application for windows.
since the software is relatively simple (i afraid not). Is anyone develop a gtk
database application using c? i did search but most of application i
found so far
either too complex(big) or using python.
it is very helpful if i can see the code for learning ...
thanks..
On 7/31/08, Vivien Malerba <vmalerba gmail com> wrote:
> 2008/7/31 Mathias Hasselmann <mathias hasselmann gmx de>:
>> 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.
>
> Actually there are 2 libraries in Gnome-DB:
> * Libgda: depending almost only on GLib and LibXML which acts as an
> abstraction layer between a database and your code (a bit like ODBC or
> JDBC)
> * Libgnomedb which uses Libgda and GTK+ and offers some data bound widgets.
>
> About memory occupation, you can choose either to load all the results
> of a SELECT into memory (which has the advantage of speed once loaded
> but consumes more memory), or use a cursor to access your data (which
> means faster initial loading and less memory consumption but slower
> data access over time).
>
> The code contains numerous examples and there is a good doc.
>
> Regards,
>
> Vivien
>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]