>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?
Do what the message tells you, catch the exception. :-)
>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);
try {
> MyDbBean.dbSelectUpdateRow();
} catch(com.ibm.db.DataException e) {
out.println("No good news: "+e);
}
> }
>
>%>
>
>
>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 claus
e 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
Ciao,
Carsten Heyl
Carsten Heyl [EMAIL PROTECTED]
NADS - Solutions on Nets http://www.nads.de/
NADS GmbH http://www.pixelboxx.de/
Hildebrandtstr. 4E Tel.: +49 211 933 02-90
D-40215 Duesseldorf Fax.: +49 211 933 02-93
===========================================================================
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