[GENERAL] Is postgresql 8.xx jdbc support SCROLL_SENSITIVE?

2005-05-18 Thread Hengki Suhartoyo
Hi, all

I have problem with my jdbc program, my java program
can't use TYPE_SCROLL_SENSITIVE.
But I need Sensitive scrollable result.

Can anybody help me?


this is my java test program,

/*
 * testRS.java
 *
 * Created on May 16, 2005, 9:48 PM
 */

import java.sql.*;
public class testRS {

public testRS() {
}

public static void main(String[] args) {
String url =
"jdbc:postgresql://localhost/testDB";
try{
Class.forName("org.postgresql.Driver");   


Connection conn =
DriverManager.getConnection(url,"user","xx"); 
 

   
System.out.println(conn.getMetaData().getDriverName());
   
System.out.println(conn.getMetaData().getDriverVersion());

if
(conn.getMetaData().supportsResultSetConcurrency(ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_UPDATABLE))
{
System.out.println("Insensitive
scrollable result sets are supported");
}
if
(conn.getMetaData().supportsResultSetConcurrency(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_UPDATABLE))
{
System.out.println("Sensitive
scrollable result sets are supported");
}
 
} catch(SQLException e) {
   
System.err.println("-SQLException-");
System.err.println("SQLState:  " +
e.getSQLState());
System.err.println("Message:  " + e.getMessage());
System.err.println("Vendor:  " + e.getErrorCode());
   
} catch(ClassNotFoundException ce) {
   
System.out.println(ce.getMessage());
}
 
}

}


And the result always like this:

PostgreSQL Native Driver
PostgreSQL 8.1devel JDBC3 with SSL (build 400)
Insensitive scrollable result sets are supported


Thank You



__ 
Do you Yahoo!? 
Yahoo! Small Business - Try our new resources site!
http://smallbusiness.yahoo.com/resources/ 

---(end of broadcast)---
TIP 5: Have you checked our extensive FAQ?

   http://www.postgresql.org/docs/faq


Re: [GENERAL] Is postgresql 8.xx jdbc support SCROLL_SENSITIVE?

2005-05-18 Thread Kris Jurka


On Wed, 18 May 2005, Hengki Suhartoyo wrote:

> I have problem with my jdbc program, I need Sensitive scrollable result.
> 

Postgresql only supports insensitive cursors and ResultSets.  Your only 
option is to reissue the query to pick up any changes.

Kris Jurka

---(end of broadcast)---
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])