Postgres and JDBC?!

From: tem2 (tem2_at_kent.ac.uk)
Date: 01/27/05


Date: Thu, 27 Jan 2005 15:58:27 -0000

Hi

Can anyone tell me how to establish a connection to the University Postgres
database using JDBC. I've looked at loads of books and Web sites on the
topic but I can't really get my head around it!

This is what I've got but it's not working:

import java.sql.*;

public class Connect
{
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");

    String url = "jdbc:odbc:PostgreSQL";
    Connection con = DriverManager.getConnection(penguin.kent.ac.uk,
"myusername", "mypassword");

}

Any help would be really helpful.

Thanks in advance.



Relevant Pages

  • Postgres and JDBC?!
    ... Can anyone tell me how to establish a connection to the University Postgres ... I've looked at loads of books and Web sites on the ...
    (comp.lang.java.help)
  • Re: Off disaster stories after going through one?
    ... > Going down to Punta Gorda to see what was left seemed to flip a switch. ... I know what you mean although no books' names come to mind. ... you that although I didn't consciously make the connection, a TV drama ...
    (rec.arts.sf.written)
  • Web Page Loading Periodically Pauses for 30 - 60 seconds
    ... I recently rebuilt my WinXP Pro desktop PC and now find that when browsing ... web pages I periodically get timed-out connections to web sites. ... It is not my LAN or internet connection because if I try connecting to web ...
    (microsoft.public.windowsxp.network_web)
  • Re: Impossible connection to http://www.microsoft.com
    ... >I can access all Web sites, included https connections but I cannot ... Impossible to load the Internet Page. ... >> Ensure no connection problems with ISP ... Maybe a browser hijack, with an agent that might not go ...
    (microsoft.public.windowsxp.network_web)
  • Re: Tracing DSL delays
    ... Web connection? ... Web sites time out. ... DNS queries fail. ... ADSL line, then you have to remember that your uplink is the limiting ...
    (comp.os.linux.networking)