Skip site navigation (1) Skip section navigation (2)

Re: I can't connect

From: "Dax Duskin" <dax(dot)duskin(at)zsassociates(dot)com>
To: Bart <bart(at)alator(dot)kotnet(dot)org>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: I can't connect
Date: 2001-03-21 20:06:20
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-jdbc
Are you running postmaster with the -i option?

Bart <bart(at)alator(dot)kotnet(dot)org> on 03/21/2001 02:00:45 PM

To:   pgsql-jdbc(at)postgresql(dot)org
cc:    (bcc: Dax Duskin/Evanston/ZSAssociates)

Subject:  [JDBC] I can't connect


I installed debian 2.2r2 with _all_ the postgres-packages,  I created a database
and via psql I can do whatever I want with the DB. Now I'm trying to make a
connection via a Java-program. I downloaded the jdbc-6.5-1.2.jar file and
renamed it to jdbc.jar and moved it to ~/jdk1.3/lib, set the CLASSPATH to
~/jdk1.3/lib and used a program, found in the Deitel&Deitel Java book.
After that, I tried to make a connection to the database I created (testing) and
I keep getting error-messages.

Can someone help me with this? I'm trying for 3 days now and still no luck.


 --- program from Deitel & Deitel ---

import java.sql.*;
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
import java.util.*;

public class TableDisplay extends JFrame
     private Connection connection;
     private JTable table;

     public TableDisplay()
          String url = "jdbc:odbc:testing";   // I also tried with <String url =
          String username = "postgres";
          String password = "notentered";

               connection = DriverManager.getConnection(url, username,
          catch (ClassNotFoundException cnfex)
               System.err.println("Failed to load the JDBC/ODBC driver.");
          catch (SQLException sqlex)
               System.err.println("Unable to connect to database.");
. . . . . . . . .

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
    (send "unregister YourEmailAddressHere" to majordomo(at)postgresql(dot)org)

Attachment: att1.eml
Description: application/octet-stream (3.6 KB)


pgsql-jdbc by date

Next:From: Bruce MomjianDate: 2001-03-21 21:17:22
Subject: New Unapplied Patches web page
Previous:From: BartDate: 2001-03-21 20:00:45
Subject: I can't connect

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group