libpq++ : Disconnect a DB

Started by Renaud Tthonnartabout 25 years ago2 messagesgeneral
Jump to latest
#1Renaud Tthonnart
thonnart@amwdb.u-strasbg.fr

Good morning everyone,

By declaring a PgDatabase variable like this, I know that I make a
connection to the DB 'test'

PgDatabase data("dbname = test");

How to end connection?
By making this?

delete data;

regards, Renaud THONNART

#2Renaud Tthonnart
thonnart@amwdb.u-strasbg.fr
In reply to: Renaud Tthonnart (#1)
Re: libpq++ : Disconnect a DB

Jose Manuel Lorenzo Lopez wrote:

Renaud Tthonnart schrieb:

Good morning everyone,

By declaring a PgDatabase variable like this, I know that I make a
connection to the DB 'test'

PgDatabase data("dbname = test");

How to end connection?
By making this?

delete data;

Hello Renaud,

I think yes, because I guess there is an implicit call to disconnect
your object by calling the destructor. But I am not sure, may be
any of the developers in this list is able to confirm my point of
view.

Best Regards / Un saludo / Mit freundlichen Gr��en / Cordiali Saluti

Jos� Manuel Lorenzo L�pez

I am thinking just like you!
Thank you to strengthen my intuition

Renaud THONNART