Обсуждение: WG: JDBC 2.0 Scrollable Result Sets -- Slightly going mad --

Поиск
Список
Период
Сортировка

WG: JDBC 2.0 Scrollable Result Sets -- Slightly going mad --

От
"Knud Alex Mueller"
Дата:

-----Ursprüngliche Nachricht-----
Von: kalexm [mailto:kalexm@gurusoft.de]
Gesendet: Donnerstag, 5. April 2001 18:31
An: pgsql-jdbc@postgresql.org
Betreff: JDBC 2.0 Scrollable Result Sets -- Slightly going mad --


Hi,
I'm new in the List. Hopefully Im at the right place for my question.

We use Tomcat 3.2., J2EE and J2SE on RedHat 7

We Set up a Postgres 7.0.3 with jdbc7.0-1.2.jar. Classpath is correct.

The Code looks like that

              Class.forName(context.getInitParameter("ClassForName"));
              url = context.getInitParameter("url");
              dataBaseUserId = context.getInitParameter("dataBaseUserId");
              dataBasePassWord =
context.getInitParameter("dataBasePassWord");
              Connection con = DriverManager.getConnection(url,
dataBaseUserId, dataBasePassWord);
              Statement stmt1 =
con.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,
ResultSet.CONCUR_READ_ONLY);

It worked fine with my development Plattform using JDBC-ODBC Bridge on
SQL-SERVER 7.0 as well as ACCESS 2000. Now deployed on the Linux machine the
exception is returned, that the function is not implemented.

I use rs.last();rs.absolute();rs.next();rs.getRow();

What can I do ?

Thanks in advance:

Knud Müller


Re: WG: JDBC 2.0 Scrollable Result Sets -- Slightly going mad --

От
Peter T Mount
Дата:
Quoting Knud Alex Mueller <k.mueller@portrix.net>:

> It worked fine with my development Plattform using JDBC-ODBC Bridge on
> SQL-SERVER 7.0 as well as ACCESS 2000. Now deployed on the Linux machine
> the
> exception is returned, that the function is not implemented.

Implemented in 7.1.

>
> I use rs.last();rs.absolute();rs.next();rs.getRow();
>
> What can I do ?

A workaround for 7.0.3 and earlier is not request the types, ie getStatement().

In the PostgreSQL driver it defaults to TYPE_SCROLL_SENSITIVE anyhow, and these
methods will always work. 7.1 implements the alternate getStatement you are
trying to use so that in 7.2 updateable resultsets can be implemented.

Peter


--
Peter Mount peter@retep.org.uk
PostgreSQL JDBC Driver: http://www.retep.org.uk/postgres/
RetepPDF PDF library for Java: http://www.retep.org.uk/pdf/