Received: from puma.zsassociates.com ([172.16.200.55]) by zsserver3.zsassociates.com (Lotus SMTP MTA v4.6.7  (934.1 12-30-1999)) with SMTP id 86256A16.006E3832; Wed, 21 Mar 2001 14:03:53 -0600
Received: from mail.postgresql.org (ddn-gateway [192.68.1.248])
	by puma.zsassociates.com (8.9.3+Sun/8.9.1) with ESMTP id OAA27715
	for <dax.duskin@zsassociates.com>; Wed, 21 Mar 2001 14:03:50 -0600 (CST)
Received: from mail.postgresql.org (webmail.postgresql.org [216.126.85.28])
	by mail.postgresql.org (8.11.3/8.11.1) with SMTP id f2LK3St35629;
	Wed, 21 Mar 2001 15:03:28 -0500 (EST)
	(envelope-from pgsql-jdbc-owner+M330@postgresql.org)
Received: from alator.kotnet.org (bones.kulnet.kuleuven.ac.be [134.58.253.193])
	by mail.postgresql.org (8.11.3/8.11.1) with ESMTP id f2LK19t34942
	for <pgsql-jdbc@postgresql.org>; Wed, 21 Mar 2001 15:01:09 -0500 (EST)
	(envelope-from bart@alator.kotnet.org)
Received: from bellerophon.alator.kotnet.org (bellerophon.alator.kotnet.org [192.168.0.101])
	by alator.kotnet.org (8.9.3/8.9.3/Debian 8.9.3-21) with ESMTP id UAA21927
	for <pgsql-jdbc@postgresql.org>; Wed, 21 Mar 2001 20:56:28 +0100
Received: from bellerophon (bellerophon.alator.kotnet.org [192.168.0.101])
	by bellerophon.alator.kotnet.org (8.9.3/8.9.3/Debian 8.9.3-21) with SMTP id VAA01046
	for <pgsql-jdbc@postgresql.org>; Wed, 21 Mar 2001 21:00:46 +0100
X-Authentication-Warning: bellerophon.alator.kotnet.org: Host bellerophon.alator.kotnet.org [192.168.0.101] claimed to be bellerophon
Date: Wed, 21 Mar 2001 21:00:45 +0100
From: Bart <bart@alator.kotnet.org>
To: pgsql-jdbc@postgresql.org
Subject: [JDBC] I can't connect
Message-Id: <20010321210045.1304ad85.bart@alator.kotnet.org>
X-Mailer: Sylpheed version 0.4.62 (GTK+ 1.2.8; i686-pc-linux-gnu)
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Precedence: bulk
Sender: pgsql-jdbc-owner@postgresql.org

Hi, 

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.

Thanks,
Bart


 --- 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 = "jdbc:postgres:testing";>
		String username = "postgres";
		String password = "notentered";

		
		try
		{
			Class.forName("jdbc.Driver");
			connection = DriverManager.getConnection(url, username, password);
		}
		catch (ClassNotFoundException cnfex)
		{
			System.err.println("Failed to load the JDBC/ODBC driver.");
			cnfex.printStackTrace();
			System.exit(1);
		}
		catch (SQLException sqlex)
		{
			System.err.println("Unable to connect to database.");
			sqlex.printStackTrace();
		}
. . . . . . . . .

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
    (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)
