Create Database using JDBC

From: "Nidhi Srivastava" <nsrivastava(at)quark(dot)com>
To: <pgsql-jdbc(at)postgresql(dot)org>
Subject: Create Database using JDBC
Date: 2005-07-01 08:30:53
Message-ID: 2BC68159E3EC814BA1E81C108DF99A4203A37FD9@EXCH-IND-VS1.india.quark.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Hi all

I wish to create a database if one doesn't exist using JDBC. I tried
connecting to template1 database and then issuing the "CREATE DATABASE
test" command but I get the following error :

ERROR: CREATE DATABASE: source database "template1"
is being accessed by other users

How do I resolve this? I'm using PostGreSQL8.0

Thanks & Regards

Nidhi

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Thomas Dudziak 2005-07-01 10:26:03 Re: Create Database using JDBC
Previous Message Oliver Jowett 2005-07-01 00:56:09 Re: jdbc cts final diff for review