JDBC 7.3 dev (Java 2 SDK 1.4.0)

From: snpe <snpe(at)snpe(dot)co(dot)yu>
To: <pgsql-jdbc(at)postgresql(dot)org>
Subject: JDBC 7.3 dev (Java 2 SDK 1.4.0)
Date: 2002-09-06 14:06:52
Message-ID: 200209061606.52292.snpe@snpe.co.yu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-jdbc

Hello,
I have simple table with column ID and values '4' in this.
I user 7.3 beta1 (from cvs 05.09.2002) and autocommit off in postgresql.conf.
Next program don't work .
I am tried with compiled postgresql.jar form CVS and with
pg73b1jdbc3.jar from 05.09.2002 on jdbc.postgresql.org

What is wrong ?

regards
Haris Peco
import java.io.*;
import java.sql.*;
import java.text.*;

public class PrepStatTest
{
Connection db;
String stat="DELETE FROM org_ban WHERE \"id\" = ?";
String delid = "4";
public PrepStatTest() throws ClassNotFoundException, FileNotFoundException,
IOException, SQLException
{
Class.forName("org.postgresql.Driver");
db = DriverManager.getConnection("jdbc:postgresql://spnew/snpe", "snpe",
"snpe");
PreparedStatement st = db.prepareStatement(stat);
st.setString(1, delid);
int rowsDeleted = st.executeUpdate();
System.out.println("Rows deleted " + rowsDeleted);
db.commit();
st.close();
db.close();
}

public static void main(String args[])
{
try
{
PrepStatTest test = new PrepStatTest();
}
catch (Exception ex)
{
System.err.println("Exception caught.\n" + ex);
ex.printStackTrace();
}
}
}

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Dave Cramer 2002-09-06 14:35:53 Re: JDBC 7.3 dev (Java 2 SDK 1.4.0)
Previous Message Olivier PRENANT 2002-09-06 14:06:41 Re: PL/Perl?

Browse pgsql-jdbc by date

  From Date Subject
Next Message Dave Cramer 2002-09-06 14:35:53 Re: JDBC 7.3 dev (Java 2 SDK 1.4.0)
Previous Message Dave Cramer 2002-09-06 14:05:18 Re: JDBC 7.3 dev (Java 2 SDK 1.4.0)