wxSQLite3 - Some sort of connection pooling  [SOLVED]

In this forum you can discuss database related issues which can be wxWidgets related, but also generic in nature.
User avatar
evstevemd
Part Of The Furniture
Part Of The Furniture
Posts: 2092
Joined: Wed Jan 28, 2009 11:57 am
Location: Dar es Salaam, United Republic of Tanzania
Contact:

wxSQLite3 - Some sort of connection pooling

Postby evstevemd » Sun Aug 29, 2010 5:06 pm

Hi,
I was thinking of some sort of database pooling with wxSQLite3.
Is it possible?

Another question, If I create wxSQLite3Database object and I want to iterate through SQLite3 database files. Should I call just Open and close or I should Open another DB and the first one will close automatically?

Thanks
Chief Justice: We have trouble dear citizens!
Citizens: What it is his honor?
Chief Justice:Our president is an atheist, who will he swear to?
[Ubuntu 15.04/Windows 10 Pro - GCC/MinGW, CodeLite IDE et al]

utelle
Moderator
Moderator
Posts: 824
Joined: Tue Jul 05, 2005 10:00 pm
Location: Cologne, Germany
Contact:

Re: wxSQLite3 - Some sort of connection pooling  [SOLVED]

Postby utelle » Mon Aug 30, 2010 7:44 pm

evstevemd wrote:I was thinking of some sort of database pooling with wxSQLite3. Is it possible?

For database systems like Oracle where establishing a database connection is a relatively expensive operation connection pooling is certainly useful. wxSQLite3 currently doesn't have support for connection pooling and I'm not sure whether it's worth the effort to add such a feature.

evstevemd wrote:If I create wxSQLite3Database object and I want to iterate through SQLite3 database files. Should I call just Open and close or I should Open another DB and the first one will close automatically?

It's not necessary to instantiate a new wxSQLite3Database object for each database file, but currently you have to call method Close before you can reuse a wxSQLite3Database instance. Although automatically closing an associated database in case method Open is called again could be added to method Open, I don't intend to implement this feature at the moment, since it's not trivial to handle possibly still open statements. But I'll add at least a check to method Open whether a database is already associated.

Regards,

Ulrich

User avatar
evstevemd
Part Of The Furniture
Part Of The Furniture
Posts: 2092
Joined: Wed Jan 28, 2009 11:57 am
Location: Dar es Salaam, United Republic of Tanzania
Contact:

Postby evstevemd » Mon Aug 30, 2010 8:03 pm

Thanks Urlich!
I see
Chief Justice: We have trouble dear citizens!
Citizens: What it is his honor?
Chief Justice:Our president is an atheist, who will he swear to?
[Ubuntu 15.04/Windows 10 Pro - GCC/MinGW, CodeLite IDE et al]


Return to “Database Related”

Who is online

Users browsing this forum: No registered users and 1 guest