Search Postgresql Archives

Is postgresql 8.xx jdbc support SCROLL_SENSITIVE?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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","xxxxxx");     
     

                       
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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux