Postgres and JDBC?!
From: tem2 (tem2_at_kent.ac.uk)
Date: 01/27/05
- Next message: Daniel Dittmar: "Re: Postgres and JDBC?!"
- Previous message: voigt_at_ynnor.de: "Hibernate Query Problem"
- Next in thread: Daniel Dittmar: "Re: Postgres and JDBC?!"
- Reply: Daniel Dittmar: "Re: Postgres and JDBC?!"
- Reply: Thomas Kellerer: "Re: Postgres and JDBC?!"
- Reply: Wiseguy: "Re: Postgres and JDBC?!"
- Reply: EricF: "Re: Postgres and JDBC?!"
- Reply: Dr.Adolf Daniel: "Re: Postgres and JDBC?!"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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.
- Next message: Daniel Dittmar: "Re: Postgres and JDBC?!"
- Previous message: voigt_at_ynnor.de: "Hibernate Query Problem"
- Next in thread: Daniel Dittmar: "Re: Postgres and JDBC?!"
- Reply: Daniel Dittmar: "Re: Postgres and JDBC?!"
- Reply: Thomas Kellerer: "Re: Postgres and JDBC?!"
- Reply: Wiseguy: "Re: Postgres and JDBC?!"
- Reply: EricF: "Re: Postgres and JDBC?!"
- Reply: Dr.Adolf Daniel: "Re: Postgres and JDBC?!"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|