Re: [INTERFACES] JDBC query...

From: Herouth Maoz <herouth(at)oumail(dot)openu(dot)ac(dot)il>
To: Mark Dzmura <mdz(at)phalanx(dot)phalanx(dot)net>, "pgsql-interfaces(at)postgreSQL(dot)org" <pgsql-interfaces(at)postgreSQL(dot)org>
Subject: Re: [INTERFACES] JDBC query...
Date: 1999-08-15 15:17:37
Message-ID: l0313030db3dc897aad3f@[147.233.159.109]
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces

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

In response to

Browse pgsql-interfaces by date

  From Date Subject
Next Message John G. Schuler 1999-08-15 17:29:47
Previous Message mmw 1999-08-15 01:09:33 Access ODBC worries - update