You have to use an Driver which supports the scrollable Result sets and the
jdbc odbc bridge doesnot do that
- Harjit
-----Original Message-----
From: Jiger Patel [mailto:[EMAIL PROTECTED]]
Sent: Friday, May 12, 2000 4:33 PM
To: [EMAIL PROTECTED]
Subject: Re: Scrollable resultset
Hi kiran,
U have to use JDBC 2.0 a seperate ext, from sun to do this. the
JDBC that comes with Java does not support it & so this exception.
bye,
Jiger
>From: Kiran Badhe <[EMAIL PROTECTED]>
>Reply-To: "A mailing list for discussion about Sun Microsystem's Java
> Servlet API Technology." <[EMAIL PROTECTED]>
>To: [EMAIL PROTECTED]
>Subject: Scrollable resultset
>Date: Thu, 11 May 2000 02:45:15 PDT
>
>Hi,
>
>I am a newbie in Java. I have written following code to use the scrollable
>resultset.When I run the compiled class file it gives me following error.
>
>Exception in thread "main" java.lang.UnsupportedOperationException at
>sun.jdbc.odbc.JdbcOdbcConnection.createStatement(JdbcOdbcConnection.java.10
18)
>
>
>Does any body know how to make this feature work?
>
>Thanks.
>Kiran
>
>- My Code---
>
>import java.sql.*;
>import java.io.*;
>public class T1
>{
>public static void main(String[] args)
>throws SQLException,IOException,ClassNotFoundException
>{
>Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
>Connection conn =
>DriverManager.getConnection("jdbc:odbc:uat","works","works");
>
>Statement stmt;
>System.err.println("Connected.");
>//Statement stmt =
>conn.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_READ_
ONLY);
>stmt = conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,
>ResultSet.CONCUR_READ_ONLY);
>ResultSet rs = stmt.executeQuery("SELECT * FROM TAB");
>System.err.println("Created");
>//PreparedStatement stmt = conn.prepareStatement("SELECT * FROM TAB");
>//ResultSet rs = stmt.executeQuery();
>
>rs.afterLast();
>while (rs.previous())
>{
>System.err.println("The Table name is " + rs.getString("TNAME"));
>}
>
>}
>}
>
>
>
>________________________________________________________________________
>Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com
>
>___________________________________________________________________________
>To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
>of the message "signoff SERVLET-INTEREST".
>
>Archives: http://archives.java.sun.com/archives/servlet-interest.html
>Resources: http://java.sun.com/products/servlet/external-resources.html
>LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html