Pass a ResultSet to a JSP from a BeanTag(s): Jaguar/EAServer

Java ResultSet can't be passed directly, you need to convert it into a portable format. Sybase have included some classes to do the transformation. The ResultSet is converted into a TabularResults (which is a portable ResultSet format).

First, the Bean returns the ResultSet into TabularResults

import com.sybase.CORBA.jdbc11.*;

java.sql.ResultSet rs;
//  do your processing to obtain a ResultSet
//  then convert it
TabularResults.ResultSet trrs = IDL.getResultSet(rs);
return trrs;
then in the JSP, you can convert it back to a ResultSet
<%@ page import="com.sybase.CORBA.jdbc11.SQL" %>
...
TabularResults.ResultSet trrs;
...
java.sql.ResultSet resultset = SQL.getResultSet(trrs);



If you find this article useful, consider making a small donation
to show your support for this Web site and its content.

Written and compiled by Réal Gagnon ©1998-2012
[ home ]