GTK+ Forums

Discussion forum for GTK+ and Programming. Ask questions, troubleshoot problems, view and post example code, or express your opinions.
It is currently Thu Aug 21, 2014 10:10 am

All times are UTC




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: Gtk+ program + SQLite
PostPosted: Sat Sep 28, 2013 7:32 pm 
Offline

Joined: Sat Sep 28, 2013 7:06 pm
Posts: 1
Hello,

I want to integrate SQLite in a GTK+ program. However, SQLite's functions seem to not integrate smoothly with the GTK event loop since they are blocking.

That is why I thought I would use threads.

Good approach, bad approach?

Thanks!


Top
 Profile  
 
 Post subject: Re: Gtk+ program + SQLite
PostPosted: Wed Oct 02, 2013 4:03 pm 
Offline
Never Seen the Sunlight

Joined: Mon Apr 28, 2008 5:52 am
Posts: 745
Location: UK
Hello,

Using threads could be a good idea if your data accesses can be lengthy. You will need to have all SQLite calls done in one thread and all GTK/GDK calls in another. You will then need to have some form of synchronisation and communication between the threads.

_________________
E.


Top
 Profile  
 
 Post subject: Re: Gtk+ program + SQLite
PostPosted: Mon Oct 07, 2013 12:30 am 
Offline
Familiar Face

Joined: Wed Jan 30, 2013 8:28 pm
Posts: 20
uses gdba a gnome library which serves as a bridge bettween Gnome library and all other databases system
it supports SQLite, Mysql, Oracle and PostGreSQL here is a link:

http://www.gnome-db.org/


Top
 Profile  
 
 Post subject: Re: Gtk+ program + SQLite
PostPosted: Mon Oct 07, 2013 6:36 am 
Offline
Never Seen the Sunlight

Joined: Mon Apr 28, 2008 5:52 am
Posts: 745
Location: UK
LibGDA is a possibility to use, but it is only a wrapper on top of SQLite and others. If has a fairly complex API compared with SQLite. There are other disadvantages of using LibGDA these include :-
- Reduced access to some features of SQLite
- Poorly supported use of threads, even the documentation says it may contain bugs!
- Even Gnome Evolution does not use LibGDA but uses SQLite directly

Even if the original poster used LibGDA they will still have the same problem when dealing with lengthy database accesses.

_________________
E.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC


Who is online

Users browsing this forum: Google [Bot] and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group