Re: Postgres and JDBC?!
From: Thomas Kellerer (NNGNVRDSJEBN_at_spammotel.com)
Date: 01/27/05
- Previous message: Daniel Dittmar: "Re: Postgres and JDBC?!"
- In reply to: tem2: "Postgres and JDBC?!"
- Next in thread: Wiseguy: "Re: Postgres and JDBC?!"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 27 Jan 2005 17:24:29 +0100
On 27.01.2005 16:58 tem2 wrote:
>
> 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");
>
> }
>
At first glance I would say:
Connection con = DriverManager.getConnection(url,"myusername", "mypassword");
getConnection() needs a JDBC URL, not a server name.
Thomas
- Previous message: Daniel Dittmar: "Re: Postgres and JDBC?!"
- In reply to: tem2: "Postgres and JDBC?!"
- Next in thread: Wiseguy: "Re: Postgres and JDBC?!"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|