From: Herouth Maoz <herouth@oumail.openu.ac.il>
To: Mark Dzmura <mdz@phalanx.phalanx.net>
To: pgsql-interfaces@postgreSQL.org <pgsql-interfaces@postgreSQL.org>
Subject: Re: [INTERFACES] JDBC query...
Date: Sun, 15 Aug 1999 18:17:37 +0300
Message-ID: <l0313030db3dc897aad3f@[147.233.159.109]> (raw)
In-Reply-To: <37B3564B.C2F7CD0@phalanx.net>
At 02:18 +0300 on 13/08/1999, Mark Dzmura wrote:
>1. Is there an object of higher "scope" than the Connection object, which
>is bound to a specific database??
A connection object is bound to one connection to a single database. If you
want to create or delete databases, you have to connect to the PostgreSQL
database named 'template1'. You will typically have a separate connection
object for this.
>2. Is there a Database object, which provides methods to create, destroy,
>and modify the schemas of tables ?? Or can I do SQL "CREATE TABLE" and
>"DROP TABLE" operations using some version of Statement which doesn't
>return a ResultSet ??
Yes, you can use statements such as CREATE TABLE, DROP TABLE, and any other
DDL statement, by using the executeUpdate() method of Statement or
PreparedStatement. Its name may suggest that it is only for UPDATE
statements, but that's not true. It's for any query which is not expected
to return a result set.
Herouth
--
Herouth Maoz, Internet developer.
Open University of Israel - Telem project
http://telem.openu.ac.il/~herutma
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-interfaces@postgresql.org
Cc: herouth@oumail.openu.ac.il, mdz@phalanx.phalanx.net
Subject: Re: [INTERFACES] JDBC query...
In-Reply-To: <l0313030db3dc897aad3f@[147.233.159.109]>
References: <37B3564B.C2F7CD0@phalanx.net> <l0313030db3dc897aad3f@[147.233.159.109]>
* 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