Release Date: 2003-11-26 Author: axman Read Count: 470 while a stmt only bind a result set, if you want to create multiple result sets, we must at the same time establishing a multi STMT If stmt is defined in the bean, will involve To an development of technical issues, the following methods can enhance the portability of the program. Define Connection as a member variable. But define STMT to a Local variable in the method so that this method will generate a new STMT each time you call this method.
CODE:
Class Dbbean {Connection Conn; dbbean () throws sqlexception {conn = ...........} public resultset Query (String SQL) throwxception {statement stmt = ......... ... resultSet = stmt.executequery (SQL); Return Rs;}}