X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id A80C453D4F for ; Wed, 13 Apr 2005 17:47:50 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 75894-09 for ; Wed, 13 Apr 2005 20:47:40 +0000 (GMT) Received: from net2.micro-automation.com (net2.micro-automation.com [64.7.141.29]) by svr1.postgresql.org (Postfix) with SMTP id 75B5753B81 for ; Wed, 13 Apr 2005 17:47:37 -0300 (ADT) Received: (qmail 13888 invoked from network); 13 Apr 2005 20:46:21 -0000 Received: from dcdsl.ebox.com (HELO ?192.168.1.36?) (davec@64.7.143.116) by net2.micro-automation.com with SMTP; 13 Apr 2005 20:46:21 -0000 Message-ID: <425D8565.5080005@fastcrypt.com> Date: Wed, 13 Apr 2005 16:47:33 -0400 From: Dave Cramer Reply-To: pg@fastcrypt.com Organization: Postgres International User-Agent: Mozilla Thunderbird 1.0 (X11/20041206) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Kristina Magwood Cc: pgsql-jdbc@postgresql.org Subject: Re: Cannot connect to remote database. References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.031 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200504/78 X-Sequence-Number: 12685 Shouldnt the url be jdbc:postgresql:////xxx; Dave Kristina Magwood wrote: > > Hi, > > I am trying to connect to two psql databases at once using jdbc. > The first database is v7.3 running on Windows under Cygwin, the second > is v8.01 on Windows both on the local LAN. > The pg_hba.conf files on both machines allow any machine on the LAN to > access the database. > People regularly access the v7.3 database from Crystal Reports, so I > know it's available. > > When I try to run the jar from the first machine, I am able to connect > to the local database, but not the remote database. > The same thing happens when I try from the second machine. > > The error is: > Backend start-up failed: FATAL: database "xxx" does not exist. > Where xxx is the name of the database on the remote server. > In other words, my program is only looking for databases on the local > machine. > > The code I use to connect is: > > DriverManager.registerDriver(new org.postgresql.Driver()); > String serviceArg = jdbc:postgresql:xxx///; > m_conn = DriverManager.getConnection(serviceArg, m_userName, > m_userPassword); > > Any help will be greatly appreciated. > > Kristina Magwood -- Dave Cramer http://www.postgresintl.com 519 939 0336 ICQ#14675561