Hi Javier,

The problem doesnt seem to be with the ResultSet , but rather with
java.sql.Statement
My guess would be that your base driver (the jdbc::odbc driver that you're
using) doesnt support the creation of
TYPE_SCROLL_INSENSITIVE / CONCUR_UPDATABLE Statement. Maybe upgrading to a
newer version or replacing the driver might help.

regards
Pramod Nair

----- Original Message -----
From: "Javier Alonso" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, February 07, 2002 1:47 PM
Subject: Problems with Result Set


> Hello everybody. I�m having a problem with the Result Set Type that i�m
> trying to create.
> When i create a Result Set that is scrollabe and updatable i get an error
> message when the servlet is called. I�m posting the code i�m using and the
> error message. I hope anybody can help me.
>
> Code:
>
>     Statement st;
>  st = null;
>  ResultSet rs;
>
>  rs = null;
>
>  ResultSetMetaData rsmeta;
>
>  try{
>
>
>   st =
>
cnx.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_UPDAT
> ABLE);
>
>   System.out.println("el tipo resultset "+st.getResultSetType());
>   rs = st.executeQuery("SELECT  a.titulo, a.entradilla, a.texto,
> a.titulo_cat, a.entradilla_cat, a.texto_cat, a.titulo_eus,
a.entradilla_eus,
> a.texto_eus, a.titulo_gal, a.entradilla_gal, a.texto_gal, a.titulo_ing,
> a.entradilla_ing, a.texto_ing, a.titulo_val, a.entradilla_val,
a.texto_val,
> b.ruta_foto, b.orden  FROM EROSKIES.CONTENIDO a, EROSKIES.CONTENIDO_FOTOS
b
> WHERE a.id_contenido="+id_contenido+"AND
b.id_contenido="+id_contenido+"");
>   file://Aqui tengo que meter la sql y a�adir datos al vector si voy a
usar
> vector
>    rsmeta=rs.getMetaData();
>
>   String cursor=rs.getCursorName();
>   file://rs.first();
>   System.out.println("cursor: "+cursor);
>  }
>
>  catch(SQLException sql){
>   System.out.println(" tengo Error SQL: ");
>   System.out.println(sql.getMessage());
>   file://sql.printStackTrace();
>   }
>  finally
>   {
>    if(st != null)
>     try
>     {
>      rs.close();
>      st.close();
>     }
>     catch(SQLException e)
>     {
>      System.out.println("Se ha producido un error al cerrar la conexion");
>      System.out.println(e.getMessage());
>     }
>   }
>   file://Aqui llamada a mostrarContenido;
>  }
>
>
> And this is the stack trace:
>
>         java.lang.UnsupportedOperationException
>  at
>
sun.jdbc.odbc.JdbcOdbcConnection.createStatement(JdbcOdbcConnection.java:101
> 8)
>  at
>
com.attest.eroski.ContenidoServlet.mirarBaseDatos(ContenidoServlet.java:200)
>  at com.attest.eroski.ContenidoServlet.doGet(ContenidoServlet.java:133)
>
>
> Anay help will be welcome
>
>
___________________________________________________________________________
> 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

Reply via email to