Hi all:
I am trying to use IBM Select bean to access database now.
I have created a Bean named DBSelectBean in visual Age for Java2.0 and
public some method of select bean,such as execute,newRow etc.
but wen I extend the class to my wrok folder and use the bean in my JSP file,
It seems can not work. here is my statment in JSP file and the error message.
Does anyone know what shuld i do?
thanks in advance.
<Script runat=Server>
String strName;
Integer age;
Integer sex;
</Script>
<%
MyDbBean.setSql("Select * From man");
MyDbBean.dbSelectExecute();
if(request.getParameter("Add")=="Add")
{
strName = (String)request.getAttribute("strName");
age = (Integer)request.getAttribute("strAge");
sex = (Integer)request.getAttribute("strSex");
MyDbBean.dbSelectNewRow(true);
MyDbBean.dbSelectSetColumnValue("name",strName);
MyDbBean.dbSelectSetColumnValue("age",age);
MyDbBean.dbSelectSetColumnValue("sex",sex);
MyDbBean.dbSelectUpdateRow();
}
%>
Error getting compiled page.
C:\WEBSPH~1\APPSER~1\servlets\pagecompile\_dbtest_xjsp.java:85: Exception
com.ibm.db.DataException must be caught, or it must be declared in the throws clause
of this method.
MyDbBean.dbSelectExecute();
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html