public DBRowSet() throws SQLException
public DBRowSet( HttpServletRequest request, HttpServletResponse response, String name, String filename) throws SQLException
public DBRowSet( HttpServletRequest request, HttpServletResponse response, String name, String filename, String connectionName) throws SQLException
public DBRowSet( HttpServletRequest request, HttpServletResponse response, String name, String filename, String connectionName, String queryName) throws SQLException
request. The request object.
response. The response object.
name. The name of the RowSet.
filename . The name of the query file from which the queries will be loaded.
connectionName. The default name of the connection to use.
queryName. The name of the query to load from the query file.
SQLException. This exception will be thrown by all constructors whenever the initMetaInfo( ) method throws SQLException.
Methods That Auto-Execute
Methods That Auto-Initialize
Methods That Take a Name Instead of an Index
Other Methods
The following methods override the corresponding NASRowSet method and execute the RowSet if and only if the RowSet is not already executing. For more information, see either the Netscape-specific NASRowSet class or the javax.sql.RowSet interface. In particular, see the RowSet execute( ) method or the DBRowSet isExecuted( ) method.
The following methods override the corresponding NASRowSet method and initialize the RowSet if and only if the RowSet is not already initialized. For more information, see the Netscape-specific NASRowSet class or the standard RowSet interface. In addition, see the DBRowSet methods init( ) and isInitialized( ).
execute( )
getCommand( )
getStatement( )
Queries created with NAB identify their parameters by name. But JDBC uses query parameters that are identified by an index.
Call any of the set methods listed above, supplying the parameter name as the String value. Each of the listed set methods will in turn call getLoadParameter( ), which returns the index associated with the named query parameter.
Call the getLoadParameter( ) method directly, supplying the parameter name to convert to a parameter index. Then call the standard RowSet version of the set methods listed above, supplying the parameter index that was previously returned by getLoadParameter( ).
The remaining DBRowSet methods are described here, with the DBRowSet class. These methods are summarized in the following table:
public int bindLoadValue( String destVariable, String value)
destVariable. The name of the variable to set.
value. The value to set for the variable.
select * from emp where :whereClause
public void clearParameters() throws SQLException
public String getFetchSize( NASString max)
max. The maximum number to retrieve for the next iteration.
%gx type=cell id=RowSet.getFetchSize(#max)%%/gx%
public int getLoadParameter( String paramName)
paramName. The name of the parameter whose index is to be retrieved.
public String getName()
public String getNextRowNumber( NASString unused)
unused. Not used.
%gx type=cell id=RowSet.getNextRowNumber()%%/gx%
public String getQueryFile()
public String getQueryName()
public String getRowNumber( NASString groupName)
groupName. Not used.
%gx type=cell id=RowSet.getRowNumber()%%/gx%
public MethodHash getStaticMethodCache()
public String getString( NASString colName) throws SQLException
colName. The name of the column, as a NASString.
public void init()
public boolean initMetaInfo( OrderedHash metaData) throws SQLException
metaData. An OrderedHash of properties. The RowSet will be initialized with these properties.
public String isEqualToExpression( NASString expression)
expression. The expression to evaluate.
MemRowSet ds = new MemRowSet(); ds.setRequest(request); ds.setResponse(response); ds.setName("myList"); ds.addListItem("Star Trek", "1"); ds.addListItem("Babylon 5", "2"); ds.addListItem("Red Dwarf", "3"); ds.addListItem("Crusade", "4"); ds.setListSelection("2"); // Babylon 5 is the default selection request.setAttribute(ds.getName(), ds);
<SELECT NAME="TVShow"> %gx type=tile id=myList% <OPTION VALUE="%gx type=cell id=myList.value% %/gx%" %gx type=cell id=myList.isEqualToExpression( myList.value=myList.ListSelection)%SELECTED %/gx% > %gx type=cell id=myList.label%%/gx% %/gx% </SELECT>
<gx type=cell id=isEqualToValue(DataSet.field_name=ALLMINE)> HTML specific to ALLMINE </gx>
public boolean isExecuted()
public boolean isInitialized()
public String isLastFetchableRecord( NASString unused)
unused. Not used. The default query name is always used.
<%gx type=cell id=RowSet.isLastFetchableRecord()%> <SCRIPT> datasetFetchCommandNext.name = "datasetFetchCommandRefresh" </SCRIPT> <%/gx%>
public void setExecuted( boolean executed)
executed. The state indicating whether the RowSet is executing or not.
public void setInitialized( boolean initialized)
initialized. The state indicating whether the RowSet is initialized.
public void setName( String name)
public int setQueryFile( String filename)
filename. The name of the file that contains the queries for this RowSet.
public int setQueryName( String query)
query. The name of the query that the DBRowSet should load.
public void setRequest( HttpServletRequest request)
request. The HttpServletRequest object.
public void setResponse( HttpServletResponse response)
response. The HttpServletResponse object.