Received: from localhost (maia-5.hub.org [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id 764A39FB782 for ; Tue, 17 Jul 2007 09:02:33 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-maia, port 10024) with ESMTP id 38523-10 for ; Tue, 17 Jul 2007 09:02:22 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.5 Received: from ik-out-1112.google.com (ik-out-1112.google.com [66.249.90.180]) by postgresql.org (Postfix) with ESMTP id A86FE9FB458 for ; Tue, 17 Jul 2007 09:02:26 -0300 (ADT) Received: by ik-out-1112.google.com with SMTP id c21so907375ika for ; Tue, 17 Jul 2007 05:02:24 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:mime-version:content-type; b=UzngoG7xK9GQ7LnSf158c05Uw4PSOn0vW4m0kd96lD1wZrpHk+CydW1cYxgivOsY/lDwrY3T7eJ7rn/JS4R1F4V6oyZSsDZIuXlM8bvfSjLn3N0e4czGblzpglhKAq5moCbmxFu6bgbgM+TJgsIA4ARQtGKJO18ErHKb1vgQQqU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:mime-version:content-type; b=TWtmgJg/eLaErvc/6ZpommJAfTrUh1gXuo8wZt0RvUUtADChY0PYtp7fZ7MLNiaUeAIpB6+Qgf5NQWcdqSGX5+Q8pxtSjVB4nfwli2jQdMqYVpEOe2iQeYKV8WJ8aF4fgwbK7+fKRmvkRPPXGuh+NFS3LaGU2oc34ksnOvL9EH8= Received: by 10.82.136.4 with SMTP id j4mr273198bud.1184673743674; Tue, 17 Jul 2007 05:02:23 -0700 (PDT) Received: by 10.82.153.18 with HTTP; Tue, 17 Jul 2007 05:02:23 -0700 (PDT) Message-ID: <6dd360360707170502sc830adbl521ec6a784ff9725@mail.gmail.com> Date: Tue, 17 Jul 2007 17:32:23 +0530 From: "durga prasad" To: pgsql-jdbc@postgresql.org Subject: please checkits urgent MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_54782_25198758.1184673743427" X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.002 tagged_above=0 required=5 tests=BAYES_50=0.001, HTML_MESSAGE=0.001 X-Spam-Level: X-Archive-Number: 200707/76 X-Sequence-Number: 17250 ------=_Part_54782_25198758.1184673743427 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline hi iam durga prasad, iam using Postgresql8.2 when iam trying to connect the driver is not working (org.postgresql.Driver) can please send me the driver class of java to connect to DB,please revert to me immediately following code i have used: pls correct and revert tome import java.sql.*; import java.io.*; class Conc { public static void main(String[] args) throws Exception { //Class.forName(" JDBC Driver goes here"); Class.forName("org.postgresql.Driver"); //jdbc:postgresql://host:port/database Connection con=DriverManager.getConnection ("jdbc:postgresql://localhost:5432/postgres","poks","aqswdefr"); Statement stmt=con.createStatement(); //system.out.println("Creating Table---->"); //stmt.executeUpdate("Create table emp(eid int, ename varchar2(12))"); System.out.println("Inserting row--->"); stmt.executeUpdate("Insert into emp values('bbbb',2)"); System.out.println("One row is Inserted....."); System.out.println("Getting data ---->"); ResultSet rs=stmt.executeQuery("select * from emp"); while(rs.next()) System.out.println(rs.getInt(1)+" "+rs.getString(2)); rs.close(); stmt.close(); con.close(); } //main() } //class ------=_Part_54782_25198758.1184673743427 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline
hi 
 
 iam durga prasad,
 
                         iam  using Postgresql8.2 when iam trying to connect the driver is not working (org.postgresql.Driver) can please send me the driver class of java to connect to DB,please revert to me immediately following code i have used:   pls correct and revert tome
 
 
 

import java.sql.*;
import java.io.*;
class Conc {
 public static void main(String[] args) throws Exception {
  
  //Class.forName(" JDBC Driver goes here");

                  Class.forName("org.postgresql.Driver");

                 //jdbc:postgresql://host:port/database

  Connection con=DriverManager.getConnection("jdbc:postgresql://localhost:5432/postgres","poks","aqswdefr");

                 

  Statement stmt=con.createStatement();

  //system.out.println("Creating Table---->");
  //stmt.executeUpdate("Create table emp(eid int, ename varchar2(12))");
  
                System.out.println("Inserting row--->");
  stmt.executeUpdate("Insert into emp values('bbbb',2)");
  System.out.println("One row is Inserted.....");
              
                System.out.println("Getting data ---->");

  ResultSet rs=stmt.executeQuery("select * from emp");
  
  while(rs.next())
  System.out.println(rs.getInt(1)+"  "+rs.getString(2));

  rs.close();
  stmt.close();
  con.close();
 } //main()
} //class

------=_Part_54782_25198758.1184673743427--