hi
i am using postgres on redhat 9 ...i have written a
jdbc code for connection with postgres...when i run it ....it gives the following error
SQL EXCEPTION The user property is missing. It is mandatory.
the code is as follows :
import java.sql.*;
class mydb
{
public static void main(
String [] args)
{
Connection dbconn ;
Statement stmt ;
ResultSet author ;
String sourceURL = "jdbc
ostgresql://localhost/synergy";
try
{
Class.forName("org.postgresql.Driver");
dbconn = DriverManager.getConnection(sourceURL);
stmt = dbconn.createStatement();
author = stmt.executeQuery("SELECT * FROM cust_info");
while(author.next())
{
System.out.println(author.getString("cust_id"));
}
dbconn.setAutoCommit(true);
stmt.close() ;
}
catch(ClassNotFoundException cnfe){
System.out.println("CLASS NOT FOUND EXCEPTION "+cnfe);
}
catch(SQLException sqle){
System.out.println("SQL EXCEPTION "+sqle);
}
}
}
plz solve it out.....