• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

In Access,Oracle8i PE ResultSet is not scrolling

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have tried to connect Access by using JdbcOdbc bridge and as well as Oracle.I am getting the connection and as well as data but when trying to make the Scrollable ResultSet,I am getting the runtime Error from an application .
The code is
import java.sql.*;
public class scrolltest
{
public static void main(String ar[])
{
Connection con;
Statement stmt;
ResultSet rs;
try
{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
con=DriverManager.getConnection("Jdbc dbc:myacc");
//myacc is a dsn to Access
stmt=con.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_UPDATABLE);
rs=stmt.executeQuery("select id,name from stDetails");
rs.absolute(2);

System.out.println(rs.getString(2));
}
catch(Exception ex)
{
ex.printStackTrace();
}
}
}
Error is
java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver]Optional feature not implemented
at sun.jdbc.odbc.JdbcOdbc.createSQLException(Unknown Source)
at sun.jdbc.odbc.JdbcOdbc.standardError(Unknown Source)
at sun.jdbc.odbc.JdbcOdbc.SQLExecDirect(Unknown Source)
at sun.jdbc.odbc.JdbcOdbcStatement.execute(Unknown Source)
at sun.jdbc.odbc.JdbcOdbcStatement.executeQuery(Unknown Source)
at scrolltest.main(scrolltest.java:15)
please help me soon
 
Bartender
Posts: 9626
16
Mac OS X Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
So what part of "Optional feature not implemented" are you having problems understanding? The JDBC-ODBC bridge is not ment for "real" applications so it will not have all the functionality a real JDBC driver has. From the Java 1.4 Documentation:

The JDBC-ODBC Bridge driver is recommended only for experimental use or when no other alternative is available.



I don't understand what you mean when you say that you are connecting to Access through Oracle. The Oracle database drivers should work as advertised on an Oracle database.
[ November 11, 2003: Message edited by: Joe Ess ]
 
If you like strawberry rhubarb pie, try blueberry rhubarb (bluebarb) pie. And try this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic