Qt-interest Archive, March 2002
Sharing database connections
Message 1 in thread
Does anyone know how I can share a database
connection between multiple QT applications on
the same machine?
Thank you,
James Hamilton
Systems/Software Engineer
Davis Tool, Inc.
(503) 648-0936 ext 378
Message 2 in thread
On Tuesday 26 March 2002 3:43 pm, James Hamilton wrote:
> Does anyone know how I can share a database
> connection between multiple QT applications on
> the same machine?
Why would you want to?
You can, though. The easiest way would be to implement a single-threaded
server process that receives incoming requests (either through sockets or
through shared memory or some such), processes the request by sending it to
the database, and returns the response.
But really, you probably do not want to.
Message 3 in thread
Connection pooling is sometimes MUCH more efficient way of doing database
interaction. You would need to share this way to accomplish
multi-application connection pooling. But, alas, I don't think it's
possible, but I don't know for certain.
-----Original Message-----
From: Christopher Thompson [mailto:christ@axionspatial.com]
Sent: Tuesday, March 26, 2002 2:54 PM
To: JAMESH@davistl.com; qt-interest@trolltech.com
Subject: Re: Sharing database connections
On Tuesday 26 March 2002 3:43 pm, James Hamilton wrote:
> Does anyone know how I can share a database
> connection between multiple QT applications on
> the same machine?
Why would you want to?
You can, though. The easiest way would be to implement a single-threaded
server process that receives incoming requests (either through sockets or
through shared memory or some such), processes the request by sending it to
the database, and returns the response.
But really, you probably do not want to.
--
[ signature omitted ]