From: Carlos Moreno <moreno@mochima.com>
To: pgsql-interfaces@postgresql.org
Subject: General question (C++ interfacing to PostgreSQL)
Date: Sun, 22 Apr 2001 12:23:06 -0400
Message-ID: <3AE3056A.AF530097@mochima.com> (raw)
I'm just curious about what the standard practice for creating
PgConnection/PgDatabase objects should be.
First, I'm not quite sure when or how should I use PgDatabase
(in the simple tests that I've done so far, I use only PgConnection).
As for the PgConnection, I'm wondering if I should create them
as local variables whenever I need to execute a selcect or
insert/update/delete statement, or if it is a better idea to
keep a unique (possibly global) PgConnection object and keep
asking it to Exec SQL statements.
Is there any considerable overhead when creating PgConnection
instances? Are multiple instances asking for trouble?
There's probably a tutorial where these guidelines are? I
haven't been able to find it, but if someone points me to
such tutorial, I'd be very grateful!
Oh, another thing... How can I prevent output from being
sent to stdout whenever I execute a SELECT statement? I'd
like to get the data, and not send it to stdout -- however,
when I do connect.Exec ("select ..... "), I get the results
of the SQL statement displayed without the program cout'ing
them explicitly...
Thanks!
Carlos
--
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-interfaces@postgresql.org
Cc: moreno@mochima.com
Subject: Re: General question (C++ interfacing to PostgreSQL)
In-Reply-To: <3AE3056A.AF530097@mochima.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox