jdbc small example - Mailing list pgsql-general

From soundar rajan
Subject jdbc small example
Date
Msg-id 19991020214327.5419.rocketmail@web2102.mail.yahoo.com
Whole thread Raw
List pgsql-general
Hi all,

If someone can tell me how to start with, connecting
java to postgresql.  I suppose I'm right.  But, I get
some errors.

import java.sql.*;

public class jd{
    public static void main(String[]a rgs){
        Class.forName("postgresql.Driver");
        String url = "jdbc:postgresql:xxx";
        connection c = Dri..M.getConn( );
        Statement stmt= conn.createStmt():
        ResultSet rs = stmt.execQu();
    }
}


The problem is ... I get a connection error, even
though the db is running at the backend.

Helps appreciated





__________________________________________________
Do You Yahoo!?
Bid and sell for free at http://auctions.yahoo.com

pgsql-general by date:

Previous
From: soundar rajan
Date:
Subject: jdbc small example
Next
From: soundar rajan
Date:
Subject: jdbc small example