From: sugumar <sugusri76@yahoo.com>
To: pgsql-jdbc@postgresql.org
Cc: sugusri76@yahoo.com
Subject: Jdbc driver
Date: Wed, 28 Mar 2001 17:51:23 +0530
Message-ID: <000801c0b781$9b819980$91e6a8c0@wipro.com> (raw)
sir ,
i am using the following code for connecting postgresql,but this code did not to the other system database.please send the correct for the driver connection.
thanks,
regards
sugumar
import java.sql.*;
import java.io.*;
import java.lang.*;
import java.net.*;
class meeting123
{
public static void main(String args[]) throws Exception
{
Class.forName("postgresql.Driver");
Connection con=DriverManager.getConnection("jdbc:postgresql://192.168.230.148/meeting,postgres,postgres");
Statement st=con.createStatement();
ResultSet rs=st.executeQuery("select * from tbluser");
while(rs.next())
{
System.out.println("StartHour:"+rs.getString(1)+"\tStartMin:"+rs.getString(2)+"\n");
}
}
}
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-jdbc@postgresql.org
Cc: sugusri76@yahoo.com
Subject: Re: Jdbc driver
In-Reply-To: <000801c0b781$9b819980$91e6a8c0@wipro.com>
References: <000801c0b781$9b819980$91e6a8c0@wipro.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox